﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public DataRow Convert2VKPOS(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVKPOS(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
             
                    break;
                case "JLT":
          
                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapVKPOS(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVKPOS(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVKPOS(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }

            MapVKPOS(ref dwLocal, dwData);

            if (!flgExist)
            {
                InsertVKPOS(dwLocal, ITXDBVERSION);
            }
            UpdateVKPOS(dwLocal, "", option);

        } 
        public void InsertVKPOS(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            or1 = OracleDB.CreateCommand();
            DataSet result = new DataSet();
            switch (ITXDBVERSION)
            {
                case "50.24":
                    or1.CommandText = "INSERT INTO VKPOS(VKPMANDANT, VKPSA, VKPAUFKRS, VKPAUFLFD, VKPAUFPOS, VKPAENDST, VKPAENDZL, VKPAENDBEN, VKPAENDDAT, VKPNEUBEN, VKPNEUDAT, VKPPAENDDAT, VKPPAENPROG, VKPAESTAT, VKPVB, VKPVG, VKPKUNDNR, VKPAUFART, VKPSACHBE, VKPPOSTYP, VKPABWERT, VKPMUSTER, VKPABVK, VKPEIL, VKPEZEIT, VKPERL, VKPPRODST, VKPARTST, VKPKOLL, VKPART, VKPFARBE, VKPGROE, VKPZENSUR, VKPAUFMART, VKPVERPART, VKPKURZBEZ, VKPKKOLL, VKPKDARTNR, VKPKDBEZ, VKPKDFARBNR, VKPPRGR, VKPARTGRP, VKPDSACHB, VKPZIELGR, VKPMENGE1, VKPMENGE2, VKPRESERV, VKPZUGET, VKPFREIGE, VKPGAUFBEST, VKPKOMMISS, VKPFAKT, VKPVERS, VKPEINGET, VKPOFFEN, VKPMEEH, VKPMEEHGRP, VKPMEEHFKT, VKPMENGE1T1, VKPMENGE1T2, VKPMENGE1T3, VKPMENGE1T4, VKPRESERVT1, VKPRESERVT2, VKPRESERVT3, VKPRESERVT4, VKPZUGETT1, VKPZUGETT2, VKPZUGETT3, VKPZUGETT4, VKPFREIGET1, VKPFREIGET2, VKPFREIGET3, VKPFREIGET4, VKPGAUFBESTT1, VKPGAUFBESTT2, VKPGAUFBESTT3, VKPGAUFBESTT4, VKPKOMMIST1, VKPKOMMIST2, VKPKOMMIST3, VKPKOMMIST4, VKPFAKTT1, VKPFAKTT2, VKPFAKTT3, VKPFAKTT4, VKPVERST1, VKPVERST2, VKPVERST3, VKPVERST4, VKPEINTT1, VKPEINTT2, VKPEINTT3, VKPEINTT4, VKPOFFENT1, VKPOFFENT2, VKPOFFENT3, VKPOFFENT4, VKPWVTERM, VKPWUTERM, VKPFREITERM, VKPVERSTERM, VKPLIEFTERM, VKPLIEFEING, VKPEINTTERM, VKPEINTEING, VKPVERZEING1, VKPVERZTERM1, VKPBESTTERM1, VKPVERZEING2, VKPVERZTERM2, VKPBESTTERM2, VKPVERZEING3, VKPVERZTERM3, VKPBESTTERM3, VKPVERZEING4, VKPVERZTERM4, VKPBESTTERM4, VKPVERZEING5, VKPVERZTERM5, VKPBESTTERM5, VKPLVDAT, VKPEINTVON, VKPVALUTA, VKPVALDAT, VKPLIEFZEIT, VKPLZEIT, VKPSTORDAT, VKPNACHL, VKPVERTKZ, VKPVKNPOS, VKPLTERMIN1, VKPLTART1, VKPMENGEP1, VKPLTERMIN2, VKPLTART2, VKPMENGEP2, VKPLTERMIN3, VKPLTART3, VKPMENGEP3, VKPLTERMIN4, VKPLTART4, VKPMENGEP4, VKPLTERMIN5, VKPLTART5, VKPMENGEP5, VKPSHOE, VKPSLAE, VKPOPTRLAE, VKPOPTART, VKPSPUL, VKPSPULG, VKPSPULGV, VKPSPULGB, VKPSPULM, VKPSPULMV, VKPSPULMB, VKPSPUL2, VKPSPULG2, VKPHUELSE, VKPKF, VKPFDRES, VKPWI, VKPSCHLICHTGR, VKPSCHLICHTNR, VKPHABR, VKPVABR, VKPSETKZ, VKPPRGRP, VKPLFDNR, VKPARTPRGR, VKPCOUPON, VKPPREIS, VKPPREH, VKPPREHGRP, VKPPREHFKT, VKPPRKZ, VKPPREISPRF, VKPUGSACHB, VKPPRLPREIS, VKPPREISUG, VKPKONFEKT, VKPPOSWERT, VKPSTAFFELF, VKPVGUET, VKPSONDERP, VKPINDEXNA1, VKPINDEXBA1, VKPINDEXWE1, VKPINDEXHS1, VKPINDEXNA2, VKPINDEXBA2, VKPINDEXWE2, VKPINDEXHS2, VKPINDEXNA3, VKPINDEXBA3, VKPINDEXWE3, VKPINDEXHS3, VKPKOAUFKRS, VKPKOAUFLFD, VKPKOAUFPOS, VKPKOAUFART, VKPARTPRF, VKPKZFREI, VKPFARBGRP, VKPARTUG, VKPFARBEUG, VKPARTOG, VKPFARBEOG, VKPIAEDAT, VKPEMENGEV, VKPEMENGEB, VKPPMENGE, VKPVERTEIL, VKPWDECK, VKPKANR, VKPKAPOS, VKPABLGRD, VKPGELISTET, VKPKONKURENT, VKPKPREIS, VKPHOCHRECH, VKPERFOLG, VKPANT, VKPANTSAV, VKPSIGNED, VKPABS, VKPABRKZ, VKPNOCOUNT, VKPEXAUFKRS, VKPEXAUFLFD, VKPEXAUFPOS, VKPEXART, VKPEXVAR, VKPEXDESS, VKPEXCOLORIT, VKPRAPLG, VKPRAPWDT, VKPGESSTA, VKPARTSTA, VKPPRSTA, VKPBSTSTA, VKPTERMSTA, VKPMGV, VKPMGB, VKPMGZU, VKPSTV, VKPSTB, VKPSTZU, VKPSTLGV, VKPSTLGB, VKPPAS, VKPPAI, VKPTSTS, VKPTSTI, VKPTSTLG, VKPTSTMAX, VKPUBLI, VKPAZUTEIL, VKPERSART, VKPZUTART, VKPZSBER, VKPFA, VKPGA, VKPQA, VKPMAART, VKPMAFZST, VKPZUSAM, VKPZUDOPA, VKPZUDPA, VKPGENEHM, VKPMUVERT, VKPZRUECK, VKPZKDAT, VKPZKBEN, VKPSTKNEUTR, VKPPARTGL, VKPKONFKZ, VKPKETTELN, VKPRESSACHB, VKPLAEVON, VKPLAEBIS, VKPSTDLAE, VKPSFERTKZ, VKPREGEL, VKPZUTPRIO, VKPSTAFFNR, VKPMAXPKT, VKPANZ1, VKPLAENGE1, VKPBREITE1, VKPANZ2, VKPLAENGE2, VKPBREITE2, VKPANZ3, VKPLAENGE3, VKPBREITE3, VKPANZ4, VKPLAENGE4, VKPBREITE4, VKPANZ5, VKPLAENGE5, VKPBREITE5, VKPFIXMASS, VKPURLAND, VKPPRFBEG, VKPPRFVKD, VKPEINWERK, VKPWERK, VKPQPKTH, VKPQPKTLH, VKPRICHGL, VKPWSCHTXT, VKPFILLER1, VKPABRUF, VKPLIEFKOMP, VKPVERSART, VKPZUSATZ, VKPKDKOMM, VKPLTEILNR, VKPVERSLO, VKPAUTOFREI, VKPSTRECKE, VKPANGETEXT, VKPANGEWIE, VKPBESTTEXT, VKPBESTWIE, VKPLIEFTEXT, VKPLIEFWIE, VKPRECHTEXT, VKPRECHWIE, VKPLVORTEXT, VKPLVORWIE, VKPIVVTTEXT, VKPIVVTWIE, VKPIVDITEXT, VKPIVDIWIE, VKPARTTEXT, VKPANGEALLG, VKPBESTALLG, VKPLIEFALLG, VKPRECHALLG, VKPLVORALLG, VKPIVVTALLG, VKPIVDIALLG, VKPANL1TXT, VKPANL2TXT, VKPANL3TXT, VKPAGT, VKPAUF1, VKPAUF2, VKPAUF3, VKPDISPO, VKPDDBENID, VKPDDAUFTNR, VKPEKOLL, VKPEART, VKPEFARBE, VKPLVERD, VKPWOBST, VKPEAKZ, VKPWAEHRSL, VKPKURS, VKPBETRAG, VKPHWAEHRSL, VKPHEUROKURS, VKPHEUROKURSVK, VKPFEUROKURS, VKPFEUROKURSVK, VKPTERMNR, VKPFAELLIG, VKPSICHER, VKPSICHP, VKPAKKRED, VKPBESTPOS, VKPDBLATT, VKPTBRIEF, VKPARTBILD, VKPFORMAT, VKPZEUGNIS, VKPPLANKRS, VKPPLANLFD, VKPRES1, VKPRES2, VKPVKZUABVH, VKPVKZUSAMP, VKPVKZUADR, VKPFKSPKZ, VKPFKSPRD, VKPFKSPTD, VKPKREDLIM, VKPSWING, VKPRAITING, VKPVERSCHL, VKPKREDBIS, VKPKREDVON, VKPLUEBKZ, VKPFRDAT, VKPFRZEIT, VKPFRBENID, VKPFRKZ, VKPCUSIGNED, VKPSTPROV, VKPSTFRACHT, VKPSTFRME, VKPSTIMP, VKPSTVERS, VKPSTZOLL, VKPFRGRENZ, VKPFRGRME, VKPVERSGRENZ, VKPZTARIF, VKPEDIKZ, VKPKOMMNR, VKPKOMMPOS, VKPEDIDAT, VKPEDIZEIT, VKPURBESTPOS, VKPVERTRNRK, VKPVERTRPOSK, VKPOPREIS, VKPOMENGE, VKPWUTERMKO, VKPKZERSATZ, VKPBUSIMODE, VKPEXMANDANT, VKPRUECKTG, VKPLIEFTERMN, VKPVERARBSTA, VKPCTO, VKPVTRNRK2, VKPVTRPOSK2, VKPAENTIME, VKPMAINPROG, VKPSAMPTYP, VKPUSRSTA, VKPACCVERS, VKPLIART, VKPDELTAE, VKPLIART2, VKPDELTAE2, VKPLIART3, VKPDELTAE3, VKPLINKMARK, VKPFILLER2)"
                        + " VALUES (:VKPMANDANT, '  ', :VKPAUFKRS, :VKPAUFLFD, :VKPAUFPOS, '00000000', 3, '        ', 0, 'SUNLV   ', 20130104, 0, '        ', 'S', 'RMB', '   ', '00000200', 'NA', 'BDE     ', '   ', 0, ' ', ' ', ' ', 2151, ' ', 'M', 'F', 'HLT10', 'PV912102                ', 'RD01      ', '       ', '1', '  ', '   ', '????è?μó32', '     ', '                        ', '                              ', '          ', 'HLT', 'WOV', 'SUNLE   ', '    ', 12300, 0, 0, 134, 134, 0, 134, 0, 0, 0, 12300, 'MTR', '2', '000001000000', 200, 12300, 19717, 3444, 0, 0, 0, 0, 100, 134, 211, 52, 100, 134, 212, 53, 0, 0, 0, 0, 100, 134, 212, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 12300, 19717, 3444, 0, 20130104, 20130104, 20130104, 20130104, '4.1.13  ', 0, '        ', '        ', 0, 0, '        ', 0, 0, '        ', 0, 0, '        ', 0, 0, '        ', 0, 0, 0, 0, 0, 0, '                                        ', 0, 0, 0, ' ', '000', 0, ' ', 0, 0, ' ', 0, 0, ' ', 0, 0, ' ', 0, 0, ' ', 0, 0, 0, 0, ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, '      ', ' ', ' ', ' ', '     ', '               ', ' ', ' ', ' ', '        ', '000', '   ', ' ', '0000012000', 'MTR', '2', '000001000000', '  ', ' ', '        ', '0000000000', 0, 0, 1476, ' ', ' ', ' ', '      ', 0, 0, 0, '      ', 0, 0, 0, '      ', 0, 0, 0, '  ', '000000', '000', '  ', ' ', ' ', ' ', 'PV912102                ', 'RD01      ', 'PV912102                ', 'RD01      ', 79899775, 0, 0, 0, ' ', ' ', '00000000', '0000', '  ', ' ', '        ', '0000000000', ' ', 0, 0, 0, ' ', 0, ' ', ' ', '  ', '000000', '000', '                    ', '   ', '          ', '          ', 0, 0, '  ', '50', '60', '70', '80', 12300, 12300, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, ' ', ' ', ' ', ' ', ' ', 0, 0, 0, ' ', 0, '  ', '           ', ' ', ' ', '    ', 'J', 0, '        ', ' ', '000', ' ', ' ', '        ', 10000, 12000, 12000, ' ', '00000000', ' ', '00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', '   ', ' ', ' ', ' ', ' ', 0, 0, 'J', '   ', '                              ', ' ', ' ', '   ', '                              ', '100227XYZ      ', '0001', '01', ' ', ' ', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '          ', ' ', ' ', ' ', ' ', '        ', '0000', '     ', '                        ', '          ', ' ', ' ', ' ', 'RMB', 10000, 1, 'RMB', 0, ' ', 0, ' ', 0, 20130104, ' ', 0, '               ', '000', ' ', ' ', ' ', ' ', ' ', '  ', '000000', ' ', ' ', ' ', ' ', ' ', ' ', 0, 0, '0090000000', '0089728588', '003', '01', 20231212, 0, ' ', 20130105, 2018, 'INTEXE  ', ' ', ' ', 0, 0, '   ', 0, 0, 0, 0, '   ', 0, '                    ', ' ', '                    ', '0000', 0, 0, '000', '                    ', '0000', '0000000000', 0, 0, ' ', '   ', '  ', 0, 0, '90', ' ', '                    ', 0, 0, '        ', '   ', '  ', '   ', '     ', 0, '     ', 0, '     ', 0, ' ', '                                      ')";
                    break;
                case "50.25":
                    or1.CommandText = "INSERT INTO VKPOS(VKPMANDANT, VKPSA, VKPAUFKRS, VKPAUFLFD, VKPAUFPOS, VKPAENDST, VKPAENDZL, VKPAENDBEN, VKPAENDDAT, VKPNEUBEN, VKPNEUDAT, VKPPAENDDAT, VKPPAENPROG, VKPAESTAT, VKPVB, VKPVG, VKPKUNDNR, VKPAUFART, VKPSACHBE, VKPPOSTYP, VKPABWERT, VKPMUSTER, VKPABVK, VKPEIL, VKPEZEIT, VKPERL, VKPERLDAT, VKPERLBEN, VKPPRODST, VKPARTST, VKPKOLL, VKPART, VKPFARBE, VKPGROE, VKPZENSUR, VKPAUFMART, VKPVERPART, VKPKURZBEZ, VKPKKOLL, VKPKDARTNR, VKPKDBEZ, VKPKDFARBNR, VKPPRGR, VKPARTGRP, VKPDSACHB, VKPZIELGR, VKPMENGE1, VKPMENGE2, VKPRESERV, VKPZUGET, VKPFREIGE, VKPGAUFBEST, VKPKOMMISS, VKPFAKT, VKPVERS, VKPEINGET, VKPOFFEN, VKPMEEH, VKPMEEHGRP, VKPMEEHFKT, VKPMENGE1T1, VKPMENGE1T2, VKPMENGE1T3, VKPMENGE1T4, VKPRESERVT1, VKPRESERVT2, VKPRESERVT3, VKPRESERVT4, VKPZUGETT1, VKPZUGETT2, VKPZUGETT3, VKPZUGETT4, VKPFREIGET1, VKPFREIGET2, VKPFREIGET3, VKPFREIGET4, VKPGAUFBESTT1, VKPGAUFBESTT2, VKPGAUFBESTT3, VKPGAUFBESTT4, VKPKOMMIST1, VKPKOMMIST2, VKPKOMMIST3, VKPKOMMIST4, VKPFAKTT1, VKPFAKTT2, VKPFAKTT3, VKPFAKTT4, VKPVERST1, VKPVERST2, VKPVERST3, VKPVERST4, VKPEINTT1, VKPEINTT2, VKPEINTT3, VKPEINTT4, VKPOFFENT1, VKPOFFENT2, VKPOFFENT3, VKPOFFENT4, VKPWVTERM, VKPWUTERM, VKPFREITERM, VKPVERSTERM, VKPLIEFTERM, VKPLIEFEING, VKPEINTTERM, VKPEINTEING, VKPVERZEING1, VKPVERZTERM1, VKPBESTTERM1, VKPVERZEING2, VKPVERZTERM2, VKPBESTTERM2, VKPVERZEING3, VKPVERZTERM3, VKPBESTTERM3, VKPVERZEING4, VKPVERZTERM4, VKPBESTTERM4, VKPVERZEING5, VKPVERZTERM5, VKPBESTTERM5, VKPLVDAT, VKPEINTVON, VKPVALUTA, VKPVALDAT, VKPLIEFZEIT, VKPLZEIT, VKPSTORDAT, VKPNACHL, VKPVERTKZ, VKPVKNPOS, VKPLTERMIN1, VKPLTART1, VKPMENGEP1, VKPLTERMIN2, VKPLTART2, VKPMENGEP2, VKPLTERMIN3, VKPLTART3, VKPMENGEP3, VKPLTERMIN4, VKPLTART4, VKPMENGEP4, VKPLTERMIN5, VKPLTART5, VKPMENGEP5, VKPSHOE, VKPSLAE, VKPOPTRLAE, VKPOPTART, VKPSPUL, VKPSPULG, VKPSPULGV, VKPSPULGB, VKPSPULM, VKPSPULMV, VKPSPULMB, VKPSPUL2, VKPSPULG2, VKPHUELSE, VKPKF, VKPFDRES, VKPWI, VKPSCHLICHTGR, VKPSCHLICHTNR, VKPHABR, VKPVABR, VKPSETKZ, VKPPRGRP, VKPLFDNR, VKPARTPRGR, VKPCOUPON, VKPPREIS, VKPPREH, VKPPREHGRP, VKPPREHFKT, VKPPRKZ, VKPPREISPRF, VKPUGSACHB, VKPPRLPREIS, VKPPREISUG, VKPKONFEKT, VKPPOSWERT, VKPSTAFFELF, VKPVGUET, VKPSONDERP, VKPINDEXNA1, VKPINDEXBA1, VKPINDEXWE1, VKPINDEXHS1, VKPINDEXNA2, VKPINDEXBA2, VKPINDEXWE2, VKPINDEXHS2, VKPINDEXNA3, VKPINDEXBA3, VKPINDEXWE3, VKPINDEXHS3, VKPKOAUFKRS, VKPKOAUFLFD, VKPKOAUFPOS, VKPKOAUFART, VKPARTPRF, VKPKZFREI, VKPFARBGRP, VKPARTUG, VKPFARBEUG, VKPARTOG, VKPFARBEOG, VKPIAEDAT, VKPEMENGEV, VKPEMENGEB, VKPPMENGE, VKPVERTEIL, VKPWDECK, VKPKANR, VKPKAPOS, VKPABLGRD, VKPGELISTET, VKPKONKURENT, VKPKPREIS, VKPHOCHRECH, VKPERFOLG, VKPANT, VKPANTSAV, VKPSIGNED, VKPABS, VKPABRKZ, VKPNOCOUNT, VKPEXAUFKRS, VKPEXAUFLFD, VKPEXAUFPOS, VKPEXART, VKPEXVAR, VKPEXDESS, VKPEXCOLORIT, VKPRAPLG, VKPRAPWDT, VKPGESSTA, VKPARTSTA, VKPPRSTA, VKPBSTSTA, VKPTERMSTA, VKPMGV, VKPMGB, VKPMGZU, VKPSTV, VKPSTB, VKPSTZU, VKPSTLGV, VKPSTLGB, VKPPAS, VKPPAI, VKPTSTS, VKPTSTI, VKPTSTLG, VKPTSTMAX, VKPUBLI, VKPAZUTEIL, VKPERSART, VKPZUTART, VKPZSBER, VKPFA, VKPGA, VKPQA, VKPMAART, VKPMAFZST, VKPZUSAM, VKPZUDOPA, VKPZUDPA, VKPGENEHM, VKPMUVERT, VKPZRUECK, VKPZKDAT, VKPZKBEN, VKPSTKNEUTR, VKPPARTGL, VKPKONFKZ, VKPKETTELN, VKPRESSACHB, VKPLAEVON, VKPLAEBIS, VKPSTDLAE, VKPSFERTKZ, VKPREGEL, VKPZUTPRIO, VKPSTAFFNR, VKPMAXPKT, VKPANZ1, VKPLAENGE1, VKPBREITE1, VKPANZ2, VKPLAENGE2, VKPBREITE2, VKPANZ3, VKPLAENGE3, VKPBREITE3, VKPANZ4, VKPLAENGE4, VKPBREITE4, VKPANZ5, VKPLAENGE5, VKPBREITE5, VKPFIXMASS, VKPURLAND, VKPPRFBEG, VKPPRFVKD, VKPEINWERK, VKPWERK, VKPQPKTH, VKPQPKTLH, VKPRICHGL, VKPWSCHTXT, VKPFILLER1, VKPABRUF, VKPLIEFKOMP, VKPVERSART, VKPZUSATZ, VKPKDKOMM, VKPLTEILNR, VKPVERSLO, VKPAUTOFREI, VKPSTRECKE, VKPANGETEXT, VKPANGEWIE, VKPBESTTEXT, VKPBESTWIE, VKPLIEFTEXT, VKPLIEFWIE, VKPRECHTEXT, VKPRECHWIE, VKPLVORTEXT, VKPLVORWIE, VKPIVVTTEXT, VKPIVVTWIE, VKPIVDITEXT, VKPIVDIWIE, VKPARTTEXT, VKPANGEALLG, VKPBESTALLG, VKPLIEFALLG, VKPRECHALLG, VKPLVORALLG, VKPIVVTALLG, VKPIVDIALLG, VKPANL1TXT, VKPANL2TXT, VKPANL3TXT, VKPAGT, VKPAUF1, VKPAUF2, VKPAUF3, VKPDISPO, VKPDDBENID, VKPDDAUFTNR, VKPEKOLL, VKPEART, VKPEFARBE, VKPLVERD, VKPWOBST, VKPEAKZ, VKPWAEHRSL, VKPKURS, VKPBETRAG, VKPHWAEHRSL, VKPHEUROKURS, VKPHEUROKURSVK, VKPFEUROKURS, VKPFEUROKURSVK, VKPTERMNR, VKPFAELLIG, VKPSICHER, VKPSICHP, VKPAKKRED, VKPBESTPOS, VKPDBLATT, VKPTBRIEF, VKPARTBILD, VKPFORMAT, VKPZEUGNIS, VKPPLANKRS, VKPPLANLFD, VKPRES1, VKPRES2, VKPVKZUABVH, VKPVKZUSAMP, VKPVKZUADR, VKPFKSPKZ, VKPFKSPRD, VKPFKSPTD, VKPKREDLIM, VKPSWING, VKPRAITING, VKPVERSCHL, VKPKREDBIS, VKPKREDVON, VKPLUEBKZ, VKPFRDAT, VKPFRZEIT, VKPFRBENID, VKPFRKZ, VKPCUSIGNED, VKPSTPROV, VKPSTFRACHT, VKPSTFRME, VKPSTIMP, VKPSTVERS, VKPSTZOLL, VKPFRGRENZ, VKPFRGRME, VKPVERSGRENZ, VKPZTARIF, VKPEDIKZ, VKPKOMMNR, VKPKOMMPOS, VKPEDIDAT, VKPEDIZEIT, VKPURBESTPOS, VKPVERTRNRK, VKPVERTRPOSK, VKPOPREIS, VKPOMENGE, VKPWUTERMKO, VKPKZERSATZ, VKPBUSIMODE, VKPEXMANDANT, VKPRUECKTG, VKPLIEFTERMN, VKPVERARBSTA, VKPCTO, VKPVTRNRK2, VKPVTRPOSK2, VKPAENTIME, VKPMAINPROG, VKPSAMPTYP, VKPUSRSTA, VKPACCVERS, VKPLIART, VKPDELTAE, VKPLIART2, VKPDELTAE2, VKPLIART3, VKPDELTAE3, VKPLINKMARK, VKPKREDNL, VKPEINSATZG, VKPVERWEND, VKPFILLER2)"
                      + " VALUES (:VKPMANDANT, '  ', :VKPAUFKRS, :VKPAUFLFD, :VKPAUFPOS, '00000000', 0, '        ', 0, 'SUNLV   ', 20130104, 0, '        ', 'S', 'RMB', '   ', '00000200', 'NA', 'BDE     ', '   ', 0, ' ', ' ', ' ', 2151, ' ', 0, '        ', 'M', 'F', 'HLT10', 'PV912102                ', 'RD01      ', '       ', '1', '  ', '   ', '??I?E<?O32', '     ', '                        ', '                              ', '          ', 'HLT', 'WOV', 'SUNLE   ', '    ', 12300, 0, 0, 134, 134, 0, 134, 0, 0, 0, 12300, 'MTR', '2', '000001000000', 200, 12300, 19717, 3444, 0, 0, 0, 0, 100, 134, 211, 52, 100, 134, 212, 53, 0, 0, 0, 0, 100, 134, 212, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 12300, 19717, 3444, 0, 20130104, 20130104, 20130104, 20130104, '4.1.13  ', 0, '        ', '        ', 0, 0, '        ', 0, 0, '        ', 0, 0, '        ', 0, 0, '        ', 0, 0, 0, 0, 0, 0, '                                        ', 0, 0, 0, ' ', '000', 0, ' ', 0, 0, ' ', 0, 0, ' ', 0, 0, ' ', 0, 0, ' ', 0, 0, 0, 0, ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, '      ', ' ', ' ', ' ', '     ', '               ', ' ', ' ', ' ', '        ', '000', '   ', ' ', '0000012000', 'MTR', '2', '000001000000', '  ', ' ', '        ', '0000000000', 0, 0, 1476, ' ', ' ', ' ', '      ', 0, 0, 0, '      ', 0, 0, 0, '      ', 0, 0, 0, '  ', '000000', '000', '  ', ' ', ' ', ' ', 'PV912102                ', 'RD01      ', 'PV912102                ', 'RD01      ', 79899775, 0, 0, 0, ' ', ' ', '00000000', '0000', '  ', ' ', '        ', '0000000000', ' ', 0, 0, 0, ' ', 0, ' ', ' ', '  ', '000000', '000', '                    ', '   ', '          ', '          ', 0, 0, '  ', '50', '60', '70', '80', 12300, 12300, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, ' ', ' ', ' ', ' ', ' ', 0, 0, 0, ' ', 0, '  ', '           ', ' ', ' ', '    ', 'J', 0, '        ', ' ', '000', ' ', ' ', '        ', 10000, 12000, 12000, ' ', '00000000', ' ', '00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', '   ', ' ', ' ', ' ', ' ', 0, 0, 'J', '   ', '                              ', ' ', ' ', '   ', '                              ', '100227XYZ      ', '0001', '01', ' ', ' ', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '0', ' ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '   ', '          ', ' ', ' ', ' ', ' ', '        ', '0000', '     ', '                        ', '          ', ' ', ' ', ' ', 'RMB', 10000, 1, 'RMB', 0, ' ', 0, ' ', 0, 20130104, ' ', 0, '               ', '000', ' ', ' ', ' ', ' ', ' ', '  ', '000000', ' ', ' ', ' ', ' ', ' ', ' ', 0, 0, '0090000000', '0089728588', '003', '01', 20231212, 0, ' ', 20130105, 2018, 'INTEXE  ', ' ', ' ', 0, 0, '   ', 0, 0, 0, 0, '   ', 0, '                    ', ' ', '                    ', '0000', 0, 0, '000', '                    ', '0000', '0000000000', 0, 0, ' ', '   ', '  ', 0, 0, '90', ' ', '                    ', 0, 0, '        ', '   ', '  ', '   ', '     ', 0, '     ', 0, '     ', 0, ' ', ' ', '    ', '    ', '                                                                                                                 ')";
                    break;
                default:
                    break;
            }
            or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
            or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
            or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
            or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
            Connect2Proxy(or1);
        }

        public DataSet QueryVKPOS(DataRow dwData, int option = 1)
        {
            DataSet Return = new DataSet();
            DataTable tbLocal = null;
            DataSet Result = new DataSet();
            string table = "VKPOS";
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VKPOS WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT * FROM VKPOS WHERE  "
                        + "  VKPMANDANT=:VKPMANDANT AND VKPSA <>'AJ'  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    break;
                case 2:
                    or1.CommandText = "SELECT * FROM VKPOS WHERE  "
                        + "  VKPMANDANT=:VKPMANDANT AND VKPSA <>'AJ' AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    break;
                case 3:
                    or1.CommandText = "SELECT VKPMANDANT,KDNAME1,VKKORDER,VKKBESTNR,VKKBESTDAT,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,VKPAUFART,VKPKOAUFKRS,VKPKOAUFLFD,VKPKOAUFPOS,VKPKOAUFART"
                        + ",VKPSA,VKPEZEIT,VKPAENDBEN,VKPAUFMART,VKPVERPART,VKPZUDOPA"
                        + ",SUBSTR(VKPKDBEZ,0,10) AS STRENGTH,SUBSTR(VKPKDBEZ,11,10) AS TWIST,SUBSTR(VKPZUSATZ,0,7) AS OVERSHORT,SUBSTR(VKPZUSATZ,8) AS COLORSTD,SUBSTR(VKPKDBEZ,21,10) AS YARNTYP"
                        + ",VKPAENDDAT,VKPNEUBEN,VKPNEUDAT,VKPPOSTYP,VKPARTST,VKPTSTLG,VKPSTLGB,VKPSTLGV"
                        + ",VKPKOLL,VKPART,VKPFARBE,VAABEZ,VAAKURZBEZ,VKPKDFARBNR,VKPMGB,VKPMGV"
                        + ",SUBSTR(X.SDDATEN,2,20) AS ARTGRP"
                        + ",VKPVERPART||':'||SUBSTR(M.SDDATEN,2,10) AS VKPVERPART,VKPAUFMART||':'||SUBSTR(P.SDDATEN,2,10) AS VKPVERPART"
                        + ",VKPKDARTNR,VKPKDBEZ,VKPMENGE1,VKPZUGET,VKPRESERV,VKPFREIGE,VKPMEEH,VKPMEEHFKT"
                        + ",VKPMENGE1T1,VKPMENGE1T2,VKPLIEFTERM,VKPVB,VKPPREH,VKPPREIS,VKPWUTERM,VKPWVTERM,VKPPOSWERT"
                        + ",VKPZUSATZ,KDKUNDNA,KDKNAME,KDNAME1,'   ' as CONSTRUCTION,'               ' AS REMARK,'                ' as REPEATORDER,0 as PREALLOCATED "
                        + " FROM VKPOS P JOIN VKKOPF ON   VKKMANDANT=VKPMANDANT AND VKKAUFKRS=VKPAUFKRS AND VKKAUFLFD=VKPAUFLFD"
                        + " LEFT JOIN VAART  ON VAAMANDANT=VKPMANDANT AND VAAKOLL=VKPKOLL AND VAAART=VKPART"
                        + " LEFT JOIN VAFARBEN ON VAFMANDANT=VKPMANDANT AND VAFKOLL=VKPKOLL AND VKPART=VAFART AND VAFFFARBE=VKPFARBE"
                        + " LEFT JOIN KDSTAMM ON VKKKUNDNR=KDKUNDNR AND VKKMANDANT=KDMANDANT"
                        + " LEFT JOIN SDDAT X ON X.SDSA='0178' AND VAAARTGRP= SUBSTR(X.SDKEY,3,3) AND SUBSTR(X.SDKEY,24,1) = 'V'"
                        + " LEFT JOIN SDDAT M ON VKPMANDANT = SUBSTR(M.SDKEY,1,2)  AND VKPAUFMART = SUBSTR(M.SDKEY,3,3) AND M.SDSA = '0114' AND SUBSTR(M.SDKEY,24,1) = 'V'"
                        + "LEFT JOIN SDDAT P ON VKPMANDANT = SUBSTR(P.SDKEY,1,2)  AND VKPVERPART = SUBSTR(P.SDKEY,3,3) AND P.SDSA = '0209' AND SUBSTR(P.SDKEY,24,1) = 'V'"
                        + " WHERE VKPMANDANT=:VKPMANDANT AND VKPSA='  ' AND VKKSA = '  ' AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD"
                        + " ORDER BY VKPAUFKRS,VKPAUFLFD,VKPAUFPOS ";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    break;
                case 4:
                    or1.CommandText = "SELECT VKPNEUDAT,KDKUNDNA,VKPKOLL,VAAPRGR,VKPAUFKRS||VKPAUFLFD AS VKPNUM,VAABEZ,VKPMENGE1,VKPWUTERM,VKPNEUBEN,VKPLIEFTERM,VKPPOSTYP"
                        + " FROM VKPOS P LEFT JOIN VAART A ON P.VKPART=VAAART"
                        + " LEFT JOIN KDSTAMM ON VKPKUNDNR= KDKUNDNR"
                        + " WHERE VKPMANDANT=:VKPMANDANT AND VKPSA='  ' AND VKPAUFKRS=:VKPAUFKRS AND VKPNEUDAT>=:VKPNEUDAT ";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPNEUDAT", OracleType.NVarChar).Value = dwData["VKPNEUDAT"].ToString();

                    break;
                case 5:
                    or1.CommandText = "SELECT * FROM VKPOS WHERE  "
                        + "  VKPMANDANT=:VKPMANDANT AND VKPSA <>'AJ'  AND VKPART=:VKPART AND VKPFARBE=:VKPFARBE";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPART", OracleType.NVarChar).Value = dwData["VKPART"].ToString();
                    or1.Parameters.Add("VKPFARBE", OracleType.NVarChar).Value = dwData["VKPFARBE"].ToString();
                    break;
                case 6:
                    or1.CommandText = "SELECT * FROM VKPOS WHERE  "
                    + "  VKPMANDANT=:VKPMANDANT AND VKPSA <>'AJ' AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    break;
                case 7:
                    or1.CommandText = "SELECT VKPPOSTYP,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,VKPNEUDAT,VKKBESTNR,VKPKDKOMM,VKKGESMENGE1 AS VKKMENGE1,VKKKUNDNR,KDKUNDNA,KDNAME1,KDLAND,KDPLZ,KDORT,KDBZ,KDSTRASSE1,VKPART,'              ' AS VKCOM,VKPFARBE,VKPKDFARBNR,VKPKOLL,VAAPRGR,VKPKDFARBNR,SUBSTR(VKPKDBEZ,0,10) AS STRENGTH,SUBSTR(VKPKDBEZ,11,10) AS TWIST,SUBSTR(VKPZUSATZ,0,7) AS OVERSHORT,SUBSTR(VKPZUSATZ,8) AS COLORSTD,VKPMENGE1*0.01 AS VKPMENGE1,VKPRESERV*0.01 AS QTYRESERVE,(VKPRESERV+VKPZUGET)*0.01 AS QTYPLAN, (VKPMENGE1-VKPZUGET)*0.01 AS QTYDIFF,CASE WHEN (VKPMENGE1-VKPZUGET)>0 THEN 'Y' ELSE 'N' END AS ISDIFF, VKPMEEH,VKPLIEFTERM,0 AS STOCKQTY,VKPZUGET*0.01 AS VKPZUGET,VKPFREIGE*0.01 AS VKPFREIGE, VKPPREIS*0.001 AS VKPPREISX,VKKHWAEHRSL||'/'||VKPPREH AS PUM,VKPERL,VKPERLDAT,VKPERLBEN, CASE VKPERL WHEN 'J' THEN ceil((To_date( VKPERLDAT, 'yyyymmdd') - To_date(VKPLIEFTERM , 'yyyymmdd'))) ELSE 0 END   AS DELAYDAYS, CASE VKPERL WHEN 'J' THEN CASE WHEN ceil((To_date( VKPERLDAT, 'yyyymmdd') - To_date(VKPLIEFTERM , 'yyyymmdd')))>0 THEN 'Y'    ELSE 'N' END   ELSE ' '  END  AS ISDELAY FROM VKPOS P JOIN VKKOPF K ON VKPAUFKRS=VKKAUFKRS AND VKPAUFLFD=VKKAUFLFD JOIN KDSTAMM ON KDKUNDNR=VKKKUNDNR JOIN VAART ON VAAART=VKPART AND VAAKOLL=VKPKOLL"
                        + " WHERE VKPMANDANT=:VKPMANDANT AND VKPSA <>'AJ' AND VKPERL=:VKPERL AND VKKAUFART=:VKKAUFART AND VKPLIEFTERM<=:DEND"
                    + " ORDER BY VKKKUNDNR,VKPLIEFTERM";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPERL", OracleType.NVarChar).Value = dwData["C1"].ToString();
                    or1.Parameters.Add("VKKAUFART", OracleType.NVarChar).Value = dwData["C2"].ToString();
                    or1.Parameters.Add("DEND", OracleType.NVarChar).Value = dwData["DEND"].ToString();
                    break;
                case 8:
                    or1.CommandText = "SELECT VKPPOSTYP,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,VKPNEUDAT,VKKBESTNR,VKKBESTDAT,VKKGLTBIS,VKPKDKOMM,VKKGESMENGE1 AS VKKMENGE1,VKKKUNDNR,KDKUNDNA,KDLAND,KDPLZ,KDORT,KDBZ,KDSTRASSE1,KDNAME1,VKPART,'              ' AS VKCOM,VKPFARBE,VKPKDFARBNR,VKPKOLL,VAAPRGR,VKPKDFARBNR,SUBSTR(VKPKDBEZ,0,10) AS STRENGTH,SUBSTR(VKPKDBEZ,11,10) AS TWIST,SUBSTR(VKPZUSATZ,0,7) AS OVERSHORT,SUBSTR(VKPZUSATZ,8) AS COLORSTD,VKPMENGE1*0.01 AS VKPMENGE1,VKPRESERV*0.01 AS QTYRESERVE,(VKPRESERV+VKPZUGET)*0.01 AS QTYPLAN,(VKPMENGE1-VKPZUGET)*0.01 AS QTYDIFF,CASE WHEN (VKPMENGE1-VKPZUGET)>0 THEN 'Y' ELSE 'N' END AS ISDIFF, VKPMEEH,VKPLIEFTERM,0 AS STOCKQTY,VKPZUGET*0.01 AS VKPZUGET,VKPFREIGE*0.01 AS VKPFREIGE, VKPPREIS*0.001 AS VKPPREISX,VKKHWAEHRSL||'/'||VKPPREH AS PUM,VKPERL,VKPERLDAT,VKPERLBEN, CASE VKPERL WHEN 'J' THEN ceil((To_date( VKPERLDAT, 'yyyymmdd') - To_date(VKPLIEFTERM , 'yyyymmdd'))) ELSE 0 END   AS DELAYDAYS, CASE VKPERL WHEN 'J' THEN CASE WHEN ceil((To_date( VKPERLDAT, 'yyyymmdd') - To_date(VKPLIEFTERM , 'yyyymmdd')))>0 THEN 'Y'    ELSE 'N' END   ELSE ' '  END  AS ISDELAY FROM VKPOS P JOIN VKKOPF K ON VKPAUFKRS=VKKAUFKRS AND VKPAUFLFD=VKKAUFLFD JOIN KDSTAMM ON KDKUNDNR=VKKKUNDNR JOIN VAART ON VAAART=VKPART AND VAAKOLL=VKPKOLL"
                        + " WHERE VKPMANDANT=:VKPMANDANT AND VKPSA <>'AJ' AND VKPERL=:VKPERL AND SUBSTR(VKPERLDAT,0,6)=RTRIM(:DMONTH)  AND VKKAUFART=:VKKAUFART"
                    + " ORDER BY VKKKUNDNR,VKPLIEFTERM";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPERL", OracleType.NVarChar).Value = dwData["C1"].ToString();
                    or1.Parameters.Add("VKKAUFART", OracleType.NVarChar).Value = dwData["C2"].ToString();
                    or1.Parameters.Add("DMONTH", OracleType.NVarChar).Value = dwData["DSTART"].ToString();
                    break;
                case 9:
                    or1.CommandText = "SELECT DISTINCT VVLIEFSCH,VKKBESTNR,P.* FROM VKPOS P JOIN VKKOPF ON VKKAUFKRS=VKPAUFKRS AND VKKAUFLFD=VKPAUFLFD JOIN VVTLIEF ON VVTAUFTYP='K' AND VKPSA='  ' AND VVTAUFKRS=VKPAUFKRS AND VVTAUFLFD=VKPAUFLFD AND VVTAUFPOS=VKPAUFPOS  JOIN VVLIEF ON VVLIEFSCH=VVTLIEFSCH WHERE  VVNEUDAT>='" + dwData["DSTART"].ToString() + "' AND VVNEUDAT<='" + dwData["DEND"].ToString() + "' AND VVSTATUS IN (" + dwData["C20"].ToString() + ")";
                    break;
                case 10:
                    or1.CommandText = "SELECT VKPAUFKRS||VKPAUFLFD||VKPAUFPOS AS VKPNUM,VKPMANDANT AS ZUMANANDANT, VKPAUFKRS AS ZUAUFKRS,VKPAUFLFD AS ZUAUFLFD,VKPAUFPOS AS ZUAUFPOS,VKPMENGE1,VKPRESERV,VKPZUGET,VKPMENGE1-VKPZUGET AS VKPOFFEN FROM VKPOS WHERE  "
                        + "   VKPSA <>'AJ' AND VKPERL=' '  AND VKPART=:VKPART AND VKPFARBE=:VKPFARBE";                  
                    or1.Parameters.Add("VKPART", OracleType.NVarChar).Value = dwData["VKPART"].ToString();
                    or1.Parameters.Add("VKPFARBE", OracleType.NVarChar).Value = dwData["VKPFARBE"].ToString();
                    break;
                default:
                    or1.CommandText = "SELECT * FROM VKPOS WHERE  "
                    + "  VKPMANDANT=:VKPMANDANT AND VKPSA <>'AJ' AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD";
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
            {
                tbLocal = Result.Tables[0];
                tbLocal.TableName = "VKPOS";
            }
            Return.Merge(Result);

            return Return;
        }
        public void UpdateVKPOS(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command====

                    or1.CommandText = "UPDATE VKPOS SET "
                        + "VKPMANDANT=:VKPMANDANT,"
                        + "VKPSA=:VKPSA,"
                        + "VKPAUFKRS=:VKPAUFKRS,"
                        + "VKPAUFLFD=:VKPAUFLFD,"
                        + "VKPAUFPOS=:VKPAUFPOS,"
                        + "VKPAENDST=:VKPAENDST,"
                        + "VKPAENDZL=:VKPAENDZL,"
                        + "VKPAENDBEN=:VKPAENDBEN,"
                        + "VKPAENDDAT=:VKPAENDDAT,"
                        + "VKPNEUBEN=:VKPNEUBEN,"
                        + "VKPNEUDAT=:VKPNEUDAT,"
                        + "VKPPAENDDAT=:VKPPAENDDAT,"
                        + "VKPPAENPROG=:VKPPAENPROG,"
                        + "VKPAESTAT=:VKPAESTAT,"
                        + "VKPVB=:VKPVB,"
                        + "VKPVG=:VKPVG,"
                        + "VKPKUNDNR=:VKPKUNDNR,"
                        + "VKPAUFART=:VKPAUFART,"
                        + "VKPSACHBE=:VKPSACHBE,"
                        + "VKPPOSTYP=:VKPPOSTYP,"
                        + "VKPABWERT=:VKPABWERT,"
                        + "VKPMUSTER=:VKPMUSTER,"
                        + "VKPABVK=:VKPABVK,"
                        + "VKPEIL=:VKPEIL,"
                        + "VKPEZEIT=:VKPEZEIT,"
                        + "VKPERL=:VKPERL,"
                        + "VKPPRODST=:VKPPRODST,"
                        + "VKPARTST=:VKPARTST,"
                        + "VKPKOLL=:VKPKOLL,"
                        + "VKPART=:VKPART,"
                        + "VKPFARBE=:VKPFARBE,"
                        + "VKPGROE=:VKPGROE,"
                        + "VKPZENSUR=:VKPZENSUR,"
                        + "VKPAUFMART=:VKPAUFMART,"
                        + "VKPVERPART=:VKPVERPART,"
                        + "VKPKURZBEZ=:VKPKURZBEZ,"
                        + "VKPKKOLL=:VKPKKOLL,"
                        + "VKPKDARTNR=:VKPKDARTNR,"
                        + "VKPKDBEZ=:VKPKDBEZ,"
                        + "VKPKDFARBNR=:VKPKDFARBNR,"
                        + "VKPPRGR=:VKPPRGR,"
                        + "VKPARTGRP=:VKPARTGRP,"
                        + "VKPDSACHB=:VKPDSACHB,"
                        + "VKPZIELGR=:VKPZIELGR,"
                        + "VKPMENGE1=:VKPMENGE1,"
                        + "VKPMENGE2=:VKPMENGE2,"
                        + "VKPRESERV=:VKPRESERV,"
                        + "VKPZUGET=:VKPZUGET,"
                        + "VKPFREIGE=:VKPFREIGE,"
                        + "VKPGAUFBEST=:VKPGAUFBEST,"
                        + "VKPKOMMISS=:VKPKOMMISS,"
                        + "VKPFAKT=:VKPFAKT,"
                        + "VKPVERS=:VKPVERS,"
                        + "VKPEINGET=:VKPEINGET,"
                        + "VKPOFFEN=:VKPOFFEN,"
                        + "VKPMEEH=:VKPMEEH,"
                        + "VKPMEEHGRP=:VKPMEEHGRP,"
                        + "VKPMEEHFKT=:VKPMEEHFKT,"
                        + "VKPMENGE1T1=:VKPMENGE1T1,"
                        + "VKPMENGE1T2=:VKPMENGE1T2,"
                        + "VKPMENGE1T3=:VKPMENGE1T3,"
                        + "VKPMENGE1T4=:VKPMENGE1T4,"
                        + "VKPRESERVT1=:VKPRESERVT1,"
                        + "VKPRESERVT2=:VKPRESERVT2,"
                        + "VKPRESERVT3=:VKPRESERVT3,"
                        + "VKPRESERVT4=:VKPRESERVT4,"
                        + "VKPZUGETT1=:VKPZUGETT1,"
                        + "VKPZUGETT2=:VKPZUGETT2,"
                        + "VKPZUGETT3=:VKPZUGETT3,"
                        + "VKPZUGETT4=:VKPZUGETT4,"
                        + "VKPFREIGET1=:VKPFREIGET1,"
                        + "VKPFREIGET2=:VKPFREIGET2,"
                        + "VKPFREIGET3=:VKPFREIGET3,"
                        + "VKPFREIGET4=:VKPFREIGET4,"
                        + "VKPGAUFBESTT1=:VKPGAUFBESTT1,"
                        + "VKPGAUFBESTT2=:VKPGAUFBESTT2,"
                        + "VKPGAUFBESTT3=:VKPGAUFBESTT3,"
                        + "VKPGAUFBESTT4=:VKPGAUFBESTT4,"
                        + "VKPKOMMIST1=:VKPKOMMIST1,"
                        + "VKPKOMMIST2=:VKPKOMMIST2,"
                        + "VKPKOMMIST3=:VKPKOMMIST3,"
                        + "VKPKOMMIST4=:VKPKOMMIST4,"
                        + "VKPFAKTT1=:VKPFAKTT1,"
                        + "VKPFAKTT2=:VKPFAKTT2,"
                        + "VKPFAKTT3=:VKPFAKTT3,"
                        + "VKPFAKTT4=:VKPFAKTT4,"
                        + "VKPVERST1=:VKPVERST1,"
                        + "VKPVERST2=:VKPVERST2,"
                        + "VKPVERST3=:VKPVERST3,"
                        + "VKPVERST4=:VKPVERST4,"
                        + "VKPEINTT1=:VKPEINTT1,"
                        + "VKPEINTT2=:VKPEINTT2,"
                        + "VKPEINTT3=:VKPEINTT3,"
                        + "VKPEINTT4=:VKPEINTT4,"
                        + "VKPOFFENT1=:VKPOFFENT1,"
                        + "VKPOFFENT2=:VKPOFFENT2,"
                        + "VKPOFFENT3=:VKPOFFENT3,"
                        + "VKPOFFENT4=:VKPOFFENT4,"
                        + "VKPWVTERM=:VKPWVTERM,"
                        + "VKPWUTERM=:VKPWUTERM,"
                        + "VKPFREITERM=:VKPFREITERM,"
                        + "VKPVERSTERM=:VKPVERSTERM,"
                        + "VKPLIEFTERM=:VKPLIEFTERM,"
                        + "VKPLIEFEING=:VKPLIEFEING,"
                        + "VKPEINTTERM=:VKPEINTTERM,"
                        + "VKPEINTEING=:VKPEINTEING,"
                        + "VKPVERZEING1=:VKPVERZEING1,"
                        + "VKPVERZTERM1=:VKPVERZTERM1,"
                        + "VKPBESTTERM1=:VKPBESTTERM1,"
                        + "VKPVERZEING2=:VKPVERZEING2,"
                        + "VKPVERZTERM2=:VKPVERZTERM2,"
                        + "VKPBESTTERM2=:VKPBESTTERM2,"
                        + "VKPVERZEING3=:VKPVERZEING3,"
                        + "VKPVERZTERM3=:VKPVERZTERM3,"
                        + "VKPBESTTERM3=:VKPBESTTERM3,"
                        + "VKPVERZEING4=:VKPVERZEING4,"
                        + "VKPVERZTERM4=:VKPVERZTERM4,"
                        + "VKPBESTTERM4=:VKPBESTTERM4,"
                        + "VKPVERZEING5=:VKPVERZEING5,"
                        + "VKPVERZTERM5=:VKPVERZTERM5,"
                        + "VKPBESTTERM5=:VKPBESTTERM5, "
                        + "VKPPREIS=:VKPPREIS,"
                        + "VKPPREH=:VKPPREH,"
                        + "VKPPOSWERT=:VKPPOSWERT,"
                        //+ "VKPARTUG=:VKPARTUG,"
                        //+ "VKPFARBEUG=:VKPFARBEUG,"
                        //+ "VKPARTOG=:VKPARTOG,"
                        //+ "VKPFARBEOG=:VKPFARBEOG,"
                        + "VKPMGV=:VKPMGV,"
                        + "VKPMGB=:VKPMGB,"
                        + "VKPVERSLO=:VKPVERSLO,"
                        + "VKPWAEHRSL=:VKPWAEHRSL,"
                        + "VKPBETRAG=:VKPBETRAG,"
                        + "VKPFAELLIG=:VKPFAELLIG,"
                        + "VKPFILLER2=:VKPFILLER2 "
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT  AND VKPSA=:VKPSA  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPSA", OracleType.NVarChar).Value = dwData["VKPSA"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPAENDST", OracleType.NVarChar).Value = dwData["VKPAENDST"].ToString();
                    or1.Parameters.Add("VKPAENDZL", OracleType.NVarChar).Value = dwData["VKPAENDZL"].ToString();
                    or1.Parameters.Add("VKPAENDBEN", OracleType.NVarChar).Value = dwData["VKPAENDBEN"].ToString();
                    or1.Parameters.Add("VKPAENDDAT", OracleType.NVarChar).Value = dwData["VKPAENDDAT"].ToString();
                    or1.Parameters.Add("VKPNEUBEN", OracleType.NVarChar).Value = dwData["VKPNEUBEN"].ToString();
                    or1.Parameters.Add("VKPNEUDAT", OracleType.NVarChar).Value = dwData["VKPNEUDAT"].ToString();
                    or1.Parameters.Add("VKPPAENDDAT", OracleType.NVarChar).Value = dwData["VKPPAENDDAT"].ToString();
                    or1.Parameters.Add("VKPPAENPROG", OracleType.NVarChar).Value = dwData["VKPPAENPROG"].ToString();
                    or1.Parameters.Add("VKPAESTAT", OracleType.NVarChar).Value = dwData["VKPAESTAT"].ToString();
                    or1.Parameters.Add("VKPVB", OracleType.NVarChar).Value = dwData["VKPVB"].ToString();
                    or1.Parameters.Add("VKPVG", OracleType.NVarChar).Value = dwData["VKPVG"].ToString();
                    or1.Parameters.Add("VKPKUNDNR", OracleType.NVarChar).Value = dwData["VKPKUNDNR"].ToString();
                    or1.Parameters.Add("VKPAUFART", OracleType.NVarChar).Value = dwData["VKPAUFART"].ToString();
                    or1.Parameters.Add("VKPSACHBE", OracleType.NVarChar).Value = dwData["VKPSACHBE"].ToString();
                    or1.Parameters.Add("VKPPOSTYP", OracleType.NVarChar).Value = dwData["VKPPOSTYP"].ToString();
                    or1.Parameters.Add("VKPABWERT", OracleType.NVarChar).Value = dwData["VKPABWERT"].ToString();
                    or1.Parameters.Add("VKPMUSTER", OracleType.NVarChar).Value = dwData["VKPMUSTER"].ToString();
                    or1.Parameters.Add("VKPABVK", OracleType.NVarChar).Value = dwData["VKPABVK"].ToString();
                    or1.Parameters.Add("VKPEIL", OracleType.NVarChar).Value = dwData["VKPEIL"].ToString();
                    or1.Parameters.Add("VKPEZEIT", OracleType.NVarChar).Value = dwData["VKPEZEIT"].ToString();
                    or1.Parameters.Add("VKPERL", OracleType.NVarChar).Value = dwData["VKPERL"].ToString();
                    or1.Parameters.Add("VKPPRODST", OracleType.NVarChar).Value = dwData["VKPPRODST"].ToString();
                    or1.Parameters.Add("VKPARTST", OracleType.NVarChar).Value = dwData["VKPARTST"].ToString();
                    or1.Parameters.Add("VKPKOLL", OracleType.NVarChar).Value = dwData["VKPKOLL"].ToString();
                    or1.Parameters.Add("VKPART", OracleType.NVarChar).Value = dwData["VKPART"].ToString();
                    or1.Parameters.Add("VKPFARBE", OracleType.NVarChar).Value = dwData["VKPFARBE"].ToString();
                    or1.Parameters.Add("VKPGROE", OracleType.NVarChar).Value = dwData["VKPGROE"].ToString();
                    or1.Parameters.Add("VKPZENSUR", OracleType.NVarChar).Value = dwData["VKPZENSUR"].ToString();
                    or1.Parameters.Add("VKPAUFMART", OracleType.NVarChar).Value = dwData["VKPAUFMART"].ToString();
                    or1.Parameters.Add("VKPVERPART", OracleType.NVarChar).Value = dwData["VKPVERPART"].ToString();
                    or1.Parameters.Add("VKPKURZBEZ", OracleType.NVarChar).Value = dwData["VKPKURZBEZ"].ToString();
                    or1.Parameters.Add("VKPKKOLL", OracleType.NVarChar).Value = dwData["VKPKKOLL"].ToString();
                    or1.Parameters.Add("VKPKDARTNR", OracleType.NVarChar).Value = dwData["VKPKDARTNR"].ToString();
                    or1.Parameters.Add("VKPKDBEZ", OracleType.NVarChar).Value = dwData["VKPKDBEZ"].ToString();
                    or1.Parameters.Add("VKPKDFARBNR", OracleType.NVarChar).Value = dwData["VKPKDFARBNR"].ToString();
                    or1.Parameters.Add("VKPPRGR", OracleType.NVarChar).Value = dwData["VKPPRGR"].ToString();
                    or1.Parameters.Add("VKPARTGRP", OracleType.NVarChar).Value = dwData["VKPARTGRP"].ToString();
                    or1.Parameters.Add("VKPDSACHB", OracleType.NVarChar).Value = dwData["VKPDSACHB"].ToString();
                    or1.Parameters.Add("VKPZIELGR", OracleType.NVarChar).Value = dwData["VKPZIELGR"].ToString();
                    or1.Parameters.Add("VKPMENGE1", OracleType.NVarChar).Value = dwData["VKPMENGE1"].ToString();
                    or1.Parameters.Add("VKPMENGE2", OracleType.NVarChar).Value = dwData["VKPMENGE2"].ToString();
                    or1.Parameters.Add("VKPRESERV", OracleType.NVarChar).Value = dwData["VKPRESERV"].ToString();
                    or1.Parameters.Add("VKPZUGET", OracleType.NVarChar).Value = dwData["VKPZUGET"].ToString();
                    or1.Parameters.Add("VKPFREIGE", OracleType.NVarChar).Value = dwData["VKPFREIGE"].ToString();
                    or1.Parameters.Add("VKPGAUFBEST", OracleType.NVarChar).Value = dwData["VKPGAUFBEST"].ToString();
                    or1.Parameters.Add("VKPKOMMISS", OracleType.NVarChar).Value = dwData["VKPKOMMISS"].ToString();
                    or1.Parameters.Add("VKPFAKT", OracleType.NVarChar).Value = dwData["VKPFAKT"].ToString();
                    or1.Parameters.Add("VKPVERS", OracleType.NVarChar).Value = dwData["VKPVERS"].ToString();
                    or1.Parameters.Add("VKPEINGET", OracleType.NVarChar).Value = dwData["VKPEINGET"].ToString();
                    or1.Parameters.Add("VKPOFFEN", OracleType.NVarChar).Value = dwData["VKPOFFEN"].ToString();
                    or1.Parameters.Add("VKPMEEH", OracleType.NVarChar).Value = dwData["VKPMEEH"].ToString();
                    or1.Parameters.Add("VKPMEEHGRP", OracleType.NVarChar).Value = dwData["VKPMEEHGRP"].ToString();
                    or1.Parameters.Add("VKPMEEHFKT", OracleType.NVarChar).Value = dwData["VKPMEEHFKT"].ToString();
                    or1.Parameters.Add("VKPMENGE1T1", OracleType.NVarChar).Value = dwData["VKPMENGE1T1"].ToString();
                    or1.Parameters.Add("VKPMENGE1T2", OracleType.NVarChar).Value = dwData["VKPMENGE1T2"].ToString();
                    or1.Parameters.Add("VKPMENGE1T3", OracleType.NVarChar).Value = dwData["VKPMENGE1T3"].ToString();
                    or1.Parameters.Add("VKPMENGE1T4", OracleType.NVarChar).Value = dwData["VKPMENGE1T4"].ToString();
                    or1.Parameters.Add("VKPRESERVT1", OracleType.NVarChar).Value = dwData["VKPRESERVT1"].ToString();
                    or1.Parameters.Add("VKPRESERVT2", OracleType.NVarChar).Value = dwData["VKPRESERVT2"].ToString();
                    or1.Parameters.Add("VKPRESERVT3", OracleType.NVarChar).Value = dwData["VKPRESERVT3"].ToString();
                    or1.Parameters.Add("VKPRESERVT4", OracleType.NVarChar).Value = dwData["VKPRESERVT4"].ToString();
                    or1.Parameters.Add("VKPZUGETT1", OracleType.NVarChar).Value = dwData["VKPZUGETT1"].ToString();
                    or1.Parameters.Add("VKPZUGETT2", OracleType.NVarChar).Value = dwData["VKPZUGETT2"].ToString();
                    or1.Parameters.Add("VKPZUGETT3", OracleType.NVarChar).Value = dwData["VKPZUGETT3"].ToString();
                    or1.Parameters.Add("VKPZUGETT4", OracleType.NVarChar).Value = dwData["VKPZUGETT4"].ToString();
                    or1.Parameters.Add("VKPFREIGET1", OracleType.NVarChar).Value = dwData["VKPFREIGET1"].ToString();
                    or1.Parameters.Add("VKPFREIGET2", OracleType.NVarChar).Value = dwData["VKPFREIGET2"].ToString();
                    or1.Parameters.Add("VKPFREIGET3", OracleType.NVarChar).Value = dwData["VKPFREIGET3"].ToString();
                    or1.Parameters.Add("VKPFREIGET4", OracleType.NVarChar).Value = dwData["VKPFREIGET4"].ToString();
                    or1.Parameters.Add("VKPGAUFBESTT1", OracleType.NVarChar).Value = dwData["VKPGAUFBESTT1"].ToString();
                    or1.Parameters.Add("VKPGAUFBESTT2", OracleType.NVarChar).Value = dwData["VKPGAUFBESTT2"].ToString();
                    or1.Parameters.Add("VKPGAUFBESTT3", OracleType.NVarChar).Value = dwData["VKPGAUFBESTT3"].ToString();
                    or1.Parameters.Add("VKPGAUFBESTT4", OracleType.NVarChar).Value = dwData["VKPGAUFBESTT4"].ToString();
                    or1.Parameters.Add("VKPKOMMIST1", OracleType.NVarChar).Value = dwData["VKPKOMMIST1"].ToString();
                    or1.Parameters.Add("VKPKOMMIST2", OracleType.NVarChar).Value = dwData["VKPKOMMIST2"].ToString();
                    or1.Parameters.Add("VKPKOMMIST3", OracleType.NVarChar).Value = dwData["VKPKOMMIST3"].ToString();
                    or1.Parameters.Add("VKPKOMMIST4", OracleType.NVarChar).Value = dwData["VKPKOMMIST4"].ToString();
                    or1.Parameters.Add("VKPFAKTT1", OracleType.NVarChar).Value = dwData["VKPFAKTT1"].ToString();
                    or1.Parameters.Add("VKPFAKTT2", OracleType.NVarChar).Value = dwData["VKPFAKTT2"].ToString();
                    or1.Parameters.Add("VKPFAKTT3", OracleType.NVarChar).Value = dwData["VKPFAKTT3"].ToString();
                    or1.Parameters.Add("VKPFAKTT4", OracleType.NVarChar).Value = dwData["VKPFAKTT4"].ToString();
                    or1.Parameters.Add("VKPVERST1", OracleType.NVarChar).Value = dwData["VKPVERST1"].ToString();
                    or1.Parameters.Add("VKPVERST2", OracleType.NVarChar).Value = dwData["VKPVERST2"].ToString();
                    or1.Parameters.Add("VKPVERST3", OracleType.NVarChar).Value = dwData["VKPVERST3"].ToString();
                    or1.Parameters.Add("VKPVERST4", OracleType.NVarChar).Value = dwData["VKPVERST4"].ToString();
                    or1.Parameters.Add("VKPEINTT1", OracleType.NVarChar).Value = dwData["VKPEINTT1"].ToString();
                    or1.Parameters.Add("VKPEINTT2", OracleType.NVarChar).Value = dwData["VKPEINTT2"].ToString();
                    or1.Parameters.Add("VKPEINTT3", OracleType.NVarChar).Value = dwData["VKPEINTT3"].ToString();
                    or1.Parameters.Add("VKPEINTT4", OracleType.NVarChar).Value = dwData["VKPEINTT4"].ToString();
                    or1.Parameters.Add("VKPOFFENT1", OracleType.NVarChar).Value = dwData["VKPOFFENT1"].ToString();
                    or1.Parameters.Add("VKPOFFENT2", OracleType.NVarChar).Value = dwData["VKPOFFENT2"].ToString();
                    or1.Parameters.Add("VKPOFFENT3", OracleType.NVarChar).Value = dwData["VKPOFFENT3"].ToString();
                    or1.Parameters.Add("VKPOFFENT4", OracleType.NVarChar).Value = dwData["VKPOFFENT4"].ToString();
                    or1.Parameters.Add("VKPWVTERM", OracleType.NVarChar).Value = dwData["VKPWVTERM"].ToString();
                    or1.Parameters.Add("VKPWUTERM", OracleType.NVarChar).Value = dwData["VKPWUTERM"].ToString();
                    or1.Parameters.Add("VKPFREITERM", OracleType.NVarChar).Value = dwData["VKPFREITERM"].ToString();
                    or1.Parameters.Add("VKPVERSTERM", OracleType.NVarChar).Value = dwData["VKPVERSTERM"].ToString();
                    or1.Parameters.Add("VKPLIEFTERM", OracleType.NVarChar).Value = dwData["VKPLIEFTERM"].ToString();
                    or1.Parameters.Add("VKPLIEFEING", OracleType.NVarChar).Value = dwData["VKPLIEFEING"].ToString();
                    or1.Parameters.Add("VKPEINTTERM", OracleType.NVarChar).Value = dwData["VKPEINTTERM"].ToString();
                    or1.Parameters.Add("VKPEINTEING", OracleType.NVarChar).Value = dwData["VKPEINTEING"].ToString();
                    or1.Parameters.Add("VKPVERZEING1", OracleType.NVarChar).Value = dwData["VKPVERZEING1"].ToString();
                    or1.Parameters.Add("VKPVERZTERM1", OracleType.NVarChar).Value = dwData["VKPVERZTERM1"].ToString();
                    or1.Parameters.Add("VKPBESTTERM1", OracleType.NVarChar).Value = dwData["VKPBESTTERM1"].ToString();
                    or1.Parameters.Add("VKPVERZEING2", OracleType.NVarChar).Value = dwData["VKPVERZEING2"].ToString();
                    or1.Parameters.Add("VKPVERZTERM2", OracleType.NVarChar).Value = dwData["VKPVERZTERM2"].ToString();
                    or1.Parameters.Add("VKPBESTTERM2", OracleType.NVarChar).Value = dwData["VKPBESTTERM2"].ToString();
                    or1.Parameters.Add("VKPVERZEING3", OracleType.NVarChar).Value = dwData["VKPVERZEING3"].ToString();
                    or1.Parameters.Add("VKPVERZTERM3", OracleType.NVarChar).Value = dwData["VKPVERZTERM3"].ToString();
                    or1.Parameters.Add("VKPBESTTERM3", OracleType.NVarChar).Value = dwData["VKPBESTTERM3"].ToString();
                    or1.Parameters.Add("VKPVERZEING4", OracleType.NVarChar).Value = dwData["VKPVERZEING4"].ToString();
                    or1.Parameters.Add("VKPVERZTERM4", OracleType.NVarChar).Value = dwData["VKPVERZTERM4"].ToString();
                    or1.Parameters.Add("VKPBESTTERM4", OracleType.NVarChar).Value = dwData["VKPBESTTERM4"].ToString();
                    or1.Parameters.Add("VKPVERZEING5", OracleType.NVarChar).Value = dwData["VKPVERZEING5"].ToString();
                    or1.Parameters.Add("VKPVERZTERM5", OracleType.NVarChar).Value = dwData["VKPVERZTERM5"].ToString();
                    or1.Parameters.Add("VKPBESTTERM5", OracleType.NVarChar).Value = dwData["VKPBESTTERM5"].ToString();
                    or1.Parameters.Add("VKPPREIS", OracleType.NVarChar).Value = dwData["VKPPREIS"].ToString();
                    or1.Parameters.Add("VKPPREH", OracleType.NVarChar).Value = dwData["VKPPREH"].ToString();
                    or1.Parameters.Add("VKPPOSWERT", OracleType.NVarChar).Value = dwData["VKPPOSWERT"].ToString();
                    //or1.Parameters.Add("VKPARTUG", OracleType.NVarChar).Value = dwData["VKPARTUG"].ToString();
                    //or1.Parameters.Add("VKPFARBEUG", OracleType.NVarChar).Value = dwData["VKPFARBEUG"].ToString();
                    //or1.Parameters.Add("VKPARTOG", OracleType.NVarChar).Value = dwData["VKPARTOG"].ToString();
                    //or1.Parameters.Add("VKPFARBEOG", OracleType.NVarChar).Value = dwData["VKPFARBEOG"].ToString();
                    or1.Parameters.Add("VKPMGV", OracleType.NVarChar).Value = dwData["VKPMGV"].ToString();
                    or1.Parameters.Add("VKPMGB", OracleType.NVarChar).Value = dwData["VKPMGB"].ToString();
                    or1.Parameters.Add("VKPVERSLO", OracleType.NVarChar).Value = dwData["VKPVERSLO"].ToString();
                    or1.Parameters.Add("VKPWAEHRSL", OracleType.NVarChar).Value = dwData["VKPWAEHRSL"].ToString();
                    or1.Parameters.Add("VKPBETRAG", OracleType.NVarChar).Value = dwData["VKPBETRAG"].ToString();
                    or1.Parameters.Add("VKPFAELLIG", OracleType.NVarChar).Value = dwData["VKPFAELLIG"].ToString();
                    or1.Parameters.Add("VKPFILLER2", OracleType.NVarChar).Value = dwData["VKPFILLER2"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    or1 = OracleDB.CreateCommand();
                    #region====Command====

                    or1.CommandText = "UPDATE VKPOS SET "
        + "VKPLVDAT=:VKPLVDAT,"
        + "VKPEINTVON=:VKPEINTVON,"
        + "VKPVALUTA=:VKPVALUTA,"
        + "VKPVALDAT=:VKPVALDAT,"
        + "VKPLIEFZEIT=:VKPLIEFZEIT,"
        + "VKPLZEIT=:VKPLZEIT,"
        + "VKPSTORDAT=:VKPSTORDAT,"
        + "VKPNACHL=:VKPNACHL,"
        + "VKPVERTKZ=:VKPVERTKZ,"
        + "VKPVKNPOS=:VKPVKNPOS,"
        + "VKPLTERMIN1=:VKPLTERMIN1,"
        + "VKPLTART1=:VKPLTART1,"
        + "VKPMENGEP1=:VKPMENGEP1,"
        + "VKPLTERMIN2=:VKPLTERMIN2,"
        + "VKPLTART2=:VKPLTART2,"
        + "VKPMENGEP2=:VKPMENGEP2,"
        + "VKPLTERMIN3=:VKPLTERMIN3,"
        + "VKPLTART3=:VKPLTART3,"
        + "VKPMENGEP3=:VKPMENGEP3,"
        + "VKPLTERMIN4=:VKPLTERMIN4,"
        + "VKPLTART4=:VKPLTART4,"
        + "VKPMENGEP4=:VKPMENGEP4,"
        + "VKPLTERMIN5=:VKPLTERMIN5,"
        + "VKPLTART5=:VKPLTART5,"
        + "VKPMENGEP5=:VKPMENGEP5,"
        + "VKPSHOE=:VKPSHOE,"
        + "VKPSLAE=:VKPSLAE,"
        + "VKPOPTRLAE=:VKPOPTRLAE,"
        + "VKPOPTART=:VKPOPTART,"
        + "VKPSPUL=:VKPSPUL,"
        + "VKPSPULG=:VKPSPULG,"
        + "VKPSPULGV=:VKPSPULGV,"
        + "VKPSPULGB=:VKPSPULGB,"
        + "VKPSPULM=:VKPSPULM,"
        + "VKPSPULMV=:VKPSPULMV,"
        + "VKPSPULMB=:VKPSPULMB,"
        + "VKPSPUL2=:VKPSPUL2,"
        + "VKPSPULG2=:VKPSPULG2,"
        + "VKPHUELSE=:VKPHUELSE,"
        + "VKPKF=:VKPKF,"
        + "VKPFDRES=:VKPFDRES,"
        + "VKPWI=:VKPWI,"
        + "VKPSCHLICHTGR=:VKPSCHLICHTGR,"
        + "VKPSCHLICHTNR=:VKPSCHLICHTNR,"
        + "VKPHABR=:VKPHABR,"
        + "VKPVABR=:VKPVABR,"
        + "VKPSETKZ=:VKPSETKZ,"
        + "VKPPRGRP=:VKPPRGRP,"
        + "VKPLFDNR=:VKPLFDNR,"
        + "VKPARTPRGR=:VKPARTPRGR,"
        + "VKPCOUPON=:VKPCOUPON,"
        + "VKPPREIS=:VKPPREIS,"
        + "VKPPREH=:VKPPREH,"
        + "VKPPREHGRP=:VKPPREHGRP,"
        + "VKPPREHFKT=:VKPPREHFKT,"
        + "VKPPRKZ=:VKPPRKZ,"
        + "VKPPREISPRF=:VKPPREISPRF,"
        + "VKPUGSACHB=:VKPUGSACHB,"
        + "VKPPRLPREIS=:VKPPRLPREIS,"
        + "VKPPREISUG=:VKPPREISUG,"
        + "VKPKONFEKT=:VKPKONFEKT,"
        + "VKPPOSWERT=:VKPPOSWERT,"
        + "VKPSTAFFELF=:VKPSTAFFELF,"
        + "VKPVGUET=:VKPVGUET,"
        + "VKPSONDERP=:VKPSONDERP,"
        + "VKPINDEXNA1=:VKPINDEXNA1,"
        + "VKPINDEXBA1=:VKPINDEXBA1,"
        + "VKPINDEXWE1=:VKPINDEXWE1,"
        + "VKPINDEXHS1=:VKPINDEXHS1,"
        + "VKPINDEXNA2=:VKPINDEXNA2,"
        + "VKPINDEXBA2=:VKPINDEXBA2,"
        + "VKPINDEXWE2=:VKPINDEXWE2,"
        + "VKPINDEXHS2=:VKPINDEXHS2,"
        + "VKPINDEXNA3=:VKPINDEXNA3,"
        + "VKPINDEXBA3=:VKPINDEXBA3,"
        + "VKPINDEXWE3=:VKPINDEXWE3,"
        + "VKPINDEXHS3=:VKPINDEXHS3,"
        + "VKPKOAUFKRS=:VKPKOAUFKRS,"
        + "VKPKOAUFLFD=:VKPKOAUFLFD,"
        + "VKPKOAUFPOS=:VKPKOAUFPOS,"
        + "VKPKOAUFART=:VKPKOAUFART,"
        + "VKPARTPRF=:VKPARTPRF,"
        + "VKPKZFREI=:VKPKZFREI,"
        + "VKPFARBGRP=:VKPFARBGRP,"
                        //+ "VKPARTUG=:VKPARTUG,"
                        //+ "VKPFARBEUG=:VKPFARBEUG,"
                        //+ "VKPARTOG=:VKPARTOG,"
                        //+ "VKPFARBEOG=:VKPFARBEOG,"
        + "VKPIAEDAT=:VKPIAEDAT,"
        + "VKPEMENGEV=:VKPEMENGEV,"
        + "VKPEMENGEB=:VKPEMENGEB,"
        + "VKPPMENGE=:VKPPMENGE,"
        + "VKPVERTEIL=:VKPVERTEIL,"
        + "VKPWDECK=:VKPWDECK,"
        + "VKPKANR=:VKPKANR,"
        + "VKPKAPOS=:VKPKAPOS,"
        + "VKPABLGRD=:VKPABLGRD,"
        + "VKPGELISTET=:VKPGELISTET,"
        + "VKPKONKURENT=:VKPKONKURENT,"
        + "VKPKPREIS=:VKPKPREIS,"
        + "VKPHOCHRECH=:VKPHOCHRECH,"
        + "VKPERFOLG=:VKPERFOLG,"
        + "VKPANT=:VKPANT,"
        + "VKPANTSAV=:VKPANTSAV,"
        + "VKPSIGNED=:VKPSIGNED,"
        + "VKPABS=:VKPABS,"
        + "VKPABRKZ=:VKPABRKZ,"
        + "VKPNOCOUNT=:VKPNOCOUNT,"
        + "VKPEXAUFKRS=:VKPEXAUFKRS,"
        + "VKPEXAUFLFD=:VKPEXAUFLFD,"
        + "VKPEXAUFPOS=:VKPEXAUFPOS,"
        + "VKPEXART=:VKPEXART,"
        + "VKPEXVAR=:VKPEXVAR,"
        + "VKPEXDESS=:VKPEXDESS,"
        + "VKPEXCOLORIT=:VKPEXCOLORIT,"
        + "VKPRAPLG=:VKPRAPLG,"
        + "VKPRAPWDT=:VKPRAPWDT,"
        + "VKPGESSTA=:VKPGESSTA,"
        + "VKPARTSTA=:VKPARTSTA,"
        + "VKPPRSTA=:VKPPRSTA,"
        + "VKPBSTSTA=:VKPBSTSTA,"
        + "VKPTERMSTA=:VKPTERMSTA,"
        + "VKPMGV=:VKPMGV,"
        + "VKPMGB=:VKPMGB,"
        + "VKPMGZU=:VKPMGZU,"
        + "VKPSTV=:VKPSTV,"
        + "VKPSTB=:VKPSTB,"
        + "VKPSTZU=:VKPSTZU,"
        + "VKPSTLGV=:VKPSTLGV,"
        + "VKPSTLGB=:VKPSTLGB,"
        + "VKPPAS=:VKPPAS,"
        + "VKPPAI=:VKPPAI,"
        + "VKPTSTS=:VKPTSTS,"
        + "VKPTSTI=:VKPTSTI,"
        + "VKPTSTLG=:VKPTSTLG,"
        + "VKPTSTMAX=:VKPTSTMAX,"
        + "VKPUBLI=:VKPUBLI,"
        + "VKPAZUTEIL=:VKPAZUTEIL,"
        + "VKPERSART=:VKPERSART,"
        + "VKPZUTART=:VKPZUTART,"
        + "VKPZSBER=:VKPZSBER,"
        + "VKPFA=:VKPFA,"
        + "VKPGA=:VKPGA,"
        + "VKPQA=:VKPQA,"
        + "VKPMAART=:VKPMAART,"
        + "VKPMAFZST=:VKPMAFZST,"
        + "VKPZUSAM=:VKPZUSAM,"
        + "VKPZUDOPA=:VKPZUDOPA,"
        + "VKPZUDPA=:VKPZUDPA,"
        + "VKPGENEHM=:VKPGENEHM,"
        + "VKPMUVERT=:VKPMUVERT,"
        + "VKPZRUECK=:VKPZRUECK,"
        + "VKPZKDAT=:VKPZKDAT,"
        + "VKPZKBEN=:VKPZKBEN,"
        + "VKPSTKNEUTR=:VKPSTKNEUTR,"
        + "VKPPARTGL=:VKPPARTGL,"
        + "VKPKONFKZ=:VKPKONFKZ,"
        + "VKPKETTELN=:VKPKETTELN,"
        + "VKPRESSACHB=:VKPRESSACHB,"
        + "VKPLAEVON=:VKPLAEVON,"
        + "VKPLAEBIS=:VKPLAEBIS,"
        + "VKPSTDLAE=:VKPSTDLAE,"
        + "VKPSFERTKZ=:VKPSFERTKZ,"
        + "VKPREGEL=:VKPREGEL,"
        + "VKPZUTPRIO=:VKPZUTPRIO,"
        + "VKPSTAFFNR=:VKPSTAFFNR,"
        + "VKPMAXPKT=:VKPMAXPKT,"
        + "VKPANZ1=:VKPANZ1,"
        + "VKPLAENGE1=:VKPLAENGE1,"
        + "VKPBREITE1=:VKPBREITE1,"
        + "VKPANZ2=:VKPANZ2,"
        + "VKPLAENGE2=:VKPLAENGE2,"
        + "VKPBREITE2=:VKPBREITE2,"
        + "VKPANZ3=:VKPANZ3,"
        + "VKPLAENGE3=:VKPLAENGE3,"
        + "VKPBREITE3=:VKPBREITE3,"
        + "VKPANZ4=:VKPANZ4,"
        + "VKPLAENGE4=:VKPLAENGE4,"
        + "VKPBREITE4=:VKPBREITE4,"
        + "VKPANZ5=:VKPANZ5,"
        + "VKPLAENGE5=:VKPLAENGE5,"
        + "VKPBREITE5=:VKPBREITE5,"
        + "VKPFIXMASS=:VKPFIXMASS,"
        + "VKPURLAND=:VKPURLAND,"
        + "VKPPRFBEG=:VKPPRFBEG,"
        + "VKPPRFVKD=:VKPPRFVKD,"
        + "VKPEINWERK=:VKPEINWERK,"
        + "VKPWERK=:VKPWERK,"
        + "VKPQPKTH=:VKPQPKTH,"
        + "VKPQPKTLH=:VKPQPKTLH,"
        + "VKPRICHGL=:VKPRICHGL,"
        + "VKPWSCHTXT=:VKPWSCHTXT,"
        + "VKPFILLER1=:VKPFILLER1,"
        + "VKPABRUF=:VKPABRUF,"
        + "VKPLIEFKOMP=:VKPLIEFKOMP,"
        + "VKPVERSART=:VKPVERSART,"
        + "VKPZUSATZ=:VKPZUSATZ,"
        + "VKPKDKOMM=:VKPKDKOMM,"
        + "VKPLTEILNR=:VKPLTEILNR,"
        + "VKPVERSLO=:VKPVERSLO,"
        + "VKPAUTOFREI=:VKPAUTOFREI,"
        + "VKPSTRECKE=:VKPSTRECKE,"
        + "VKPANGETEXT=:VKPANGETEXT,"
        + "VKPANGEWIE=:VKPANGEWIE,"
        + "VKPBESTTEXT=:VKPBESTTEXT,"
        + "VKPBESTWIE=:VKPBESTWIE,"
        + "VKPLIEFTEXT=:VKPLIEFTEXT,"
        + "VKPLIEFWIE=:VKPLIEFWIE,"
        + "VKPRECHTEXT=:VKPRECHTEXT,"
        + "VKPRECHWIE=:VKPRECHWIE,"
        + "VKPLVORTEXT=:VKPLVORTEXT,"
        + "VKPLVORWIE=:VKPLVORWIE,"
        + "VKPIVVTTEXT=:VKPIVVTTEXT,"
        + "VKPIVVTWIE=:VKPIVVTWIE,"
        + "VKPIVDITEXT=:VKPIVDITEXT,"
        + "VKPIVDIWIE=:VKPIVDIWIE,"
        + "VKPARTTEXT=:VKPARTTEXT,"
        + "VKPANGEALLG=:VKPANGEALLG,"
        + "VKPBESTALLG=:VKPBESTALLG,"
        + "VKPLIEFALLG=:VKPLIEFALLG,"
        + "VKPRECHALLG=:VKPRECHALLG,"
        + "VKPLVORALLG=:VKPLVORALLG,"
        + "VKPIVVTALLG=:VKPIVVTALLG,"
        + "VKPIVDIALLG=:VKPIVDIALLG,"
        + "VKPANL1TXT=:VKPANL1TXT,"
        + "VKPANL2TXT=:VKPANL2TXT,"
        + "VKPANL3TXT=:VKPANL3TXT,"
        + "VKPAGT=:VKPAGT,"
        + "VKPAUF1=:VKPAUF1,"
        + "VKPAUF2=:VKPAUF2,"
        + "VKPAUF3=:VKPAUF3,"
        + "VKPDISPO=:VKPDISPO,"
        + "VKPDDBENID=:VKPDDBENID,"
        + "VKPDDAUFTNR=:VKPDDAUFTNR,"
        + "VKPEKOLL=:VKPEKOLL,"
        + "VKPEART=:VKPEART,"
        + "VKPEFARBE=:VKPEFARBE,"
        + "VKPLVERD=:VKPLVERD,"
        + "VKPWOBST=:VKPWOBST,"
        + "VKPEAKZ=:VKPEAKZ,"
        + "VKPWAEHRSL=:VKPWAEHRSL,"
        + "VKPKURS=:VKPKURS,"
        + "VKPBETRAG=:VKPBETRAG,"
        + "VKPHWAEHRSL=:VKPHWAEHRSL,"
        + "VKPHEUROKURS=:VKPHEUROKURS,"
        + "VKPHEUROKURSVK=:VKPHEUROKURSVK,"
        + "VKPFEUROKURS=:VKPFEUROKURS,"
        + "VKPFEUROKURSVK=:VKPFEUROKURSVK,"
        + "VKPTERMNR=:VKPTERMNR,"
        + "VKPFAELLIG=:VKPFAELLIG,"
        + "VKPSICHER=:VKPSICHER,"
        + "VKPSICHP=:VKPSICHP,"
        + "VKPAKKRED=:VKPAKKRED,"
        + "VKPBESTPOS=:VKPBESTPOS,"
        + "VKPDBLATT=:VKPDBLATT,"
        + "VKPTBRIEF=:VKPTBRIEF,"
        + "VKPARTBILD=:VKPARTBILD,"
        + "VKPFORMAT=:VKPFORMAT,"
        + "VKPZEUGNIS=:VKPZEUGNIS,"
        + "VKPPLANKRS=:VKPPLANKRS,"
        + "VKPPLANLFD=:VKPPLANLFD,"
        + "VKPRES1=:VKPRES1,"
        + "VKPRES2=:VKPRES2,"
        + "VKPVKZUABVH=:VKPVKZUABVH,"
        + "VKPVKZUSAMP=:VKPVKZUSAMP,"
        + "VKPVKZUADR=:VKPVKZUADR,"
        + "VKPFKSPKZ=:VKPFKSPKZ,"
        + "VKPFKSPRD=:VKPFKSPRD,"
        + "VKPFKSPTD=:VKPFKSPTD,"
        + "VKPKREDLIM=:VKPKREDLIM,"
        + "VKPSWING=:VKPSWING,"
        + "VKPRAITING=:VKPRAITING,"
        + "VKPVERSCHL=:VKPVERSCHL,"
        + "VKPKREDBIS=:VKPKREDBIS,"
        + "VKPKREDVON=:VKPKREDVON,"
        + "VKPLUEBKZ=:VKPLUEBKZ,"
        + "VKPFRDAT=:VKPFRDAT,"
        + "VKPFRZEIT=:VKPFRZEIT,"
        + "VKPFRBENID=:VKPFRBENID,"
        + "VKPFRKZ=:VKPFRKZ,"
        + "VKPCUSIGNED=:VKPCUSIGNED,"
        + "VKPSTPROV=:VKPSTPROV,"
        + "VKPSTFRACHT=:VKPSTFRACHT,"
        + "VKPSTFRME=:VKPSTFRME,"
        + "VKPSTIMP=:VKPSTIMP,"
        + "VKPSTVERS=:VKPSTVERS,"
        + "VKPSTZOLL=:VKPSTZOLL,"
        + "VKPFRGRENZ=:VKPFRGRENZ,"
        + "VKPFRGRME=:VKPFRGRME,"
        + "VKPVERSGRENZ=:VKPVERSGRENZ,"
        + "VKPZTARIF=:VKPZTARIF,"
        + "VKPEDIKZ=:VKPEDIKZ,"
        + "VKPKOMMNR=:VKPKOMMNR,"
        + "VKPKOMMPOS=:VKPKOMMPOS,"
        + "VKPEDIDAT=:VKPEDIDAT,"
        + "VKPEDIZEIT=:VKPEDIZEIT,"
        + "VKPURBESTPOS=:VKPURBESTPOS,"
        + "VKPVERTRNRK=:VKPVERTRNRK,"
        + "VKPVERTRPOSK=:VKPVERTRPOSK,"
        + "VKPOPREIS=:VKPOPREIS,"
        + "VKPOMENGE=:VKPOMENGE,"
        + "VKPWUTERMKO=:VKPWUTERMKO,"
        + "VKPKZERSATZ=:VKPKZERSATZ,"
        + "VKPBUSIMODE=:VKPBUSIMODE,"
        + "VKPEXMANDANT=:VKPEXMANDANT,"
        + "VKPRUECKTG=:VKPRUECKTG,"
        + "VKPLIEFTERMN=:VKPLIEFTERMN,"
        + "VKPVERARBSTA=:VKPVERARBSTA,"
        + "VKPCTO=:VKPCTO,"
        + "VKPVTRNRK2=:VKPVTRNRK2,"
        + "VKPVTRPOSK2=:VKPVTRPOSK2,"
        + "VKPAENTIME=:VKPAENTIME,"
        + "VKPMAINPROG=:VKPMAINPROG,"
        + "VKPSAMPTYP=:VKPSAMPTYP,"
        + "VKPUSRSTA=:VKPUSRSTA,"
        + "VKPACCVERS=:VKPACCVERS,"
        + "VKPLIART=:VKPLIART,"
        + "VKPDELTAE=:VKPDELTAE,"
        + "VKPLIART2=:VKPLIART2,"
        + "VKPDELTAE2=:VKPDELTAE2,"
        + "VKPLIART3=:VKPLIART3,"
        + "VKPDELTAE3=:VKPDELTAE3,"
        + "VKPLINKMARK=:VKPLINKMARK,"
        + "VKPFILLER2=:VKPFILLER2"
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT AND VKPSA=:VKPSA AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPSA", OracleType.NVarChar).Value = dwData["VKPSA"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPLVDAT", OracleType.NVarChar).Value = dwData["VKPLVDAT"].ToString();
                    or1.Parameters.Add("VKPEINTVON", OracleType.NVarChar).Value = dwData["VKPEINTVON"].ToString();
                    or1.Parameters.Add("VKPVALUTA", OracleType.NVarChar).Value = dwData["VKPVALUTA"].ToString();
                    or1.Parameters.Add("VKPVALDAT", OracleType.NVarChar).Value = dwData["VKPVALDAT"].ToString();
                    or1.Parameters.Add("VKPLIEFZEIT", OracleType.NVarChar).Value = dwData["VKPLIEFZEIT"].ToString();
                    or1.Parameters.Add("VKPLZEIT", OracleType.NVarChar).Value = dwData["VKPLZEIT"].ToString();
                    or1.Parameters.Add("VKPSTORDAT", OracleType.NVarChar).Value = dwData["VKPSTORDAT"].ToString();
                    or1.Parameters.Add("VKPNACHL", OracleType.NVarChar).Value = dwData["VKPNACHL"].ToString();
                    or1.Parameters.Add("VKPVERTKZ", OracleType.NVarChar).Value = dwData["VKPVERTKZ"].ToString();
                    or1.Parameters.Add("VKPVKNPOS", OracleType.NVarChar).Value = dwData["VKPVKNPOS"].ToString();
                    or1.Parameters.Add("VKPLTERMIN1", OracleType.NVarChar).Value = dwData["VKPLTERMIN1"].ToString();
                    or1.Parameters.Add("VKPLTART1", OracleType.NVarChar).Value = dwData["VKPLTART1"].ToString();
                    or1.Parameters.Add("VKPMENGEP1", OracleType.NVarChar).Value = dwData["VKPMENGEP1"].ToString();
                    or1.Parameters.Add("VKPLTERMIN2", OracleType.NVarChar).Value = dwData["VKPLTERMIN2"].ToString();
                    or1.Parameters.Add("VKPLTART2", OracleType.NVarChar).Value = dwData["VKPLTART2"].ToString();
                    or1.Parameters.Add("VKPMENGEP2", OracleType.NVarChar).Value = dwData["VKPMENGEP2"].ToString();
                    or1.Parameters.Add("VKPLTERMIN3", OracleType.NVarChar).Value = dwData["VKPLTERMIN3"].ToString();
                    or1.Parameters.Add("VKPLTART3", OracleType.NVarChar).Value = dwData["VKPLTART3"].ToString();
                    or1.Parameters.Add("VKPMENGEP3", OracleType.NVarChar).Value = dwData["VKPMENGEP3"].ToString();
                    or1.Parameters.Add("VKPLTERMIN4", OracleType.NVarChar).Value = dwData["VKPLTERMIN4"].ToString();
                    or1.Parameters.Add("VKPLTART4", OracleType.NVarChar).Value = dwData["VKPLTART4"].ToString();
                    or1.Parameters.Add("VKPMENGEP4", OracleType.NVarChar).Value = dwData["VKPMENGEP4"].ToString();
                    or1.Parameters.Add("VKPLTERMIN5", OracleType.NVarChar).Value = dwData["VKPLTERMIN5"].ToString();
                    or1.Parameters.Add("VKPLTART5", OracleType.NVarChar).Value = dwData["VKPLTART5"].ToString();
                    or1.Parameters.Add("VKPMENGEP5", OracleType.NVarChar).Value = dwData["VKPMENGEP5"].ToString();
                    or1.Parameters.Add("VKPSHOE", OracleType.NVarChar).Value = dwData["VKPSHOE"].ToString();
                    or1.Parameters.Add("VKPSLAE", OracleType.NVarChar).Value = dwData["VKPSLAE"].ToString();
                    or1.Parameters.Add("VKPOPTRLAE", OracleType.NVarChar).Value = dwData["VKPOPTRLAE"].ToString();
                    or1.Parameters.Add("VKPOPTART", OracleType.NVarChar).Value = dwData["VKPOPTART"].ToString();
                    or1.Parameters.Add("VKPSPUL", OracleType.NVarChar).Value = dwData["VKPSPUL"].ToString();
                    or1.Parameters.Add("VKPSPULG", OracleType.NVarChar).Value = dwData["VKPSPULG"].ToString();
                    or1.Parameters.Add("VKPSPULGV", OracleType.NVarChar).Value = dwData["VKPSPULGV"].ToString();
                    or1.Parameters.Add("VKPSPULGB", OracleType.NVarChar).Value = dwData["VKPSPULGB"].ToString();
                    or1.Parameters.Add("VKPSPULM", OracleType.NVarChar).Value = dwData["VKPSPULM"].ToString();
                    or1.Parameters.Add("VKPSPULMV", OracleType.NVarChar).Value = dwData["VKPSPULMV"].ToString();
                    or1.Parameters.Add("VKPSPULMB", OracleType.NVarChar).Value = dwData["VKPSPULMB"].ToString();
                    or1.Parameters.Add("VKPSPUL2", OracleType.NVarChar).Value = dwData["VKPSPUL2"].ToString();
                    or1.Parameters.Add("VKPSPULG2", OracleType.NVarChar).Value = dwData["VKPSPULG2"].ToString();
                    or1.Parameters.Add("VKPHUELSE", OracleType.NVarChar).Value = dwData["VKPHUELSE"].ToString();
                    or1.Parameters.Add("VKPKF", OracleType.NVarChar).Value = dwData["VKPKF"].ToString();
                    or1.Parameters.Add("VKPFDRES", OracleType.NVarChar).Value = dwData["VKPFDRES"].ToString();
                    or1.Parameters.Add("VKPWI", OracleType.NVarChar).Value = dwData["VKPWI"].ToString();
                    or1.Parameters.Add("VKPSCHLICHTGR", OracleType.NVarChar).Value = dwData["VKPSCHLICHTGR"].ToString();
                    or1.Parameters.Add("VKPSCHLICHTNR", OracleType.NVarChar).Value = dwData["VKPSCHLICHTNR"].ToString();
                    or1.Parameters.Add("VKPHABR", OracleType.NVarChar).Value = dwData["VKPHABR"].ToString();
                    or1.Parameters.Add("VKPVABR", OracleType.NVarChar).Value = dwData["VKPVABR"].ToString();
                    or1.Parameters.Add("VKPSETKZ", OracleType.NVarChar).Value = dwData["VKPSETKZ"].ToString();
                    or1.Parameters.Add("VKPPRGRP", OracleType.NVarChar).Value = dwData["VKPPRGRP"].ToString();
                    or1.Parameters.Add("VKPLFDNR", OracleType.NVarChar).Value = dwData["VKPLFDNR"].ToString();
                    or1.Parameters.Add("VKPARTPRGR", OracleType.NVarChar).Value = dwData["VKPARTPRGR"].ToString();
                    or1.Parameters.Add("VKPCOUPON", OracleType.NVarChar).Value = dwData["VKPCOUPON"].ToString();
                    or1.Parameters.Add("VKPPREIS", OracleType.NVarChar).Value = dwData["VKPPREIS"].ToString();
                    or1.Parameters.Add("VKPPREH", OracleType.NVarChar).Value = dwData["VKPPREH"].ToString();
                    or1.Parameters.Add("VKPPREHGRP", OracleType.NVarChar).Value = dwData["VKPPREHGRP"].ToString();
                    or1.Parameters.Add("VKPPREHFKT", OracleType.NVarChar).Value = dwData["VKPPREHFKT"].ToString();
                    or1.Parameters.Add("VKPPRKZ", OracleType.NVarChar).Value = dwData["VKPPRKZ"].ToString();
                    or1.Parameters.Add("VKPPREISPRF", OracleType.NVarChar).Value = dwData["VKPPREISPRF"].ToString();
                    or1.Parameters.Add("VKPUGSACHB", OracleType.NVarChar).Value = dwData["VKPUGSACHB"].ToString();
                    or1.Parameters.Add("VKPPRLPREIS", OracleType.NVarChar).Value = dwData["VKPPRLPREIS"].ToString();
                    or1.Parameters.Add("VKPPREISUG", OracleType.NVarChar).Value = dwData["VKPPREISUG"].ToString();
                    or1.Parameters.Add("VKPKONFEKT", OracleType.NVarChar).Value = dwData["VKPKONFEKT"].ToString();
                    or1.Parameters.Add("VKPPOSWERT", OracleType.NVarChar).Value = dwData["VKPPOSWERT"].ToString();
                    or1.Parameters.Add("VKPSTAFFELF", OracleType.NVarChar).Value = dwData["VKPSTAFFELF"].ToString();
                    or1.Parameters.Add("VKPVGUET", OracleType.NVarChar).Value = dwData["VKPVGUET"].ToString();
                    or1.Parameters.Add("VKPSONDERP", OracleType.NVarChar).Value = dwData["VKPSONDERP"].ToString();
                    or1.Parameters.Add("VKPINDEXNA1", OracleType.NVarChar).Value = dwData["VKPINDEXNA1"].ToString();
                    or1.Parameters.Add("VKPINDEXBA1", OracleType.NVarChar).Value = dwData["VKPINDEXBA1"].ToString();
                    or1.Parameters.Add("VKPINDEXWE1", OracleType.NVarChar).Value = dwData["VKPINDEXWE1"].ToString();
                    or1.Parameters.Add("VKPINDEXHS1", OracleType.NVarChar).Value = dwData["VKPINDEXHS1"].ToString();
                    or1.Parameters.Add("VKPINDEXNA2", OracleType.NVarChar).Value = dwData["VKPINDEXNA2"].ToString();
                    or1.Parameters.Add("VKPINDEXBA2", OracleType.NVarChar).Value = dwData["VKPINDEXBA2"].ToString();
                    or1.Parameters.Add("VKPINDEXWE2", OracleType.NVarChar).Value = dwData["VKPINDEXWE2"].ToString();
                    or1.Parameters.Add("VKPINDEXHS2", OracleType.NVarChar).Value = dwData["VKPINDEXHS2"].ToString();
                    or1.Parameters.Add("VKPINDEXNA3", OracleType.NVarChar).Value = dwData["VKPINDEXNA3"].ToString();
                    or1.Parameters.Add("VKPINDEXBA3", OracleType.NVarChar).Value = dwData["VKPINDEXBA3"].ToString();
                    or1.Parameters.Add("VKPINDEXWE3", OracleType.NVarChar).Value = dwData["VKPINDEXWE3"].ToString();
                    or1.Parameters.Add("VKPINDEXHS3", OracleType.NVarChar).Value = dwData["VKPINDEXHS3"].ToString();
                    or1.Parameters.Add("VKPKOAUFKRS", OracleType.NVarChar).Value = dwData["VKPKOAUFKRS"].ToString();
                    or1.Parameters.Add("VKPKOAUFLFD", OracleType.NVarChar).Value = dwData["VKPKOAUFLFD"].ToString();
                    or1.Parameters.Add("VKPKOAUFPOS", OracleType.NVarChar).Value = dwData["VKPKOAUFPOS"].ToString();
                    or1.Parameters.Add("VKPKOAUFART", OracleType.NVarChar).Value = dwData["VKPKOAUFART"].ToString();
                    or1.Parameters.Add("VKPARTPRF", OracleType.NVarChar).Value = dwData["VKPARTPRF"].ToString();
                    or1.Parameters.Add("VKPKZFREI", OracleType.NVarChar).Value = dwData["VKPKZFREI"].ToString();
                    or1.Parameters.Add("VKPFARBGRP", OracleType.NVarChar).Value = dwData["VKPFARBGRP"].ToString();
                    //or1.Parameters.Add("VKPARTUG", OracleType.NVarChar).Value = dwData["VKPARTUG"].ToString();
                    //or1.Parameters.Add("VKPFARBEUG", OracleType.NVarChar).Value = dwData["VKPFARBEUG"].ToString();
                    //or1.Parameters.Add("VKPARTOG", OracleType.NVarChar).Value = dwData["VKPARTOG"].ToString();
                    //or1.Parameters.Add("VKPFARBEOG", OracleType.NVarChar).Value = dwData["VKPFARBEOG"].ToString();
                    or1.Parameters.Add("VKPIAEDAT", OracleType.NVarChar).Value = dwData["VKPIAEDAT"].ToString();
                    or1.Parameters.Add("VKPEMENGEV", OracleType.NVarChar).Value = dwData["VKPEMENGEV"].ToString();
                    or1.Parameters.Add("VKPEMENGEB", OracleType.NVarChar).Value = dwData["VKPEMENGEB"].ToString();
                    or1.Parameters.Add("VKPPMENGE", OracleType.NVarChar).Value = dwData["VKPPMENGE"].ToString();
                    or1.Parameters.Add("VKPVERTEIL", OracleType.NVarChar).Value = dwData["VKPVERTEIL"].ToString();
                    or1.Parameters.Add("VKPWDECK", OracleType.NVarChar).Value = dwData["VKPWDECK"].ToString();
                    or1.Parameters.Add("VKPKANR", OracleType.NVarChar).Value = dwData["VKPKANR"].ToString();
                    or1.Parameters.Add("VKPKAPOS", OracleType.NVarChar).Value = dwData["VKPKAPOS"].ToString();
                    or1.Parameters.Add("VKPABLGRD", OracleType.NVarChar).Value = dwData["VKPABLGRD"].ToString();
                    or1.Parameters.Add("VKPGELISTET", OracleType.NVarChar).Value = dwData["VKPGELISTET"].ToString();
                    or1.Parameters.Add("VKPKONKURENT", OracleType.NVarChar).Value = dwData["VKPKONKURENT"].ToString();
                    or1.Parameters.Add("VKPKPREIS", OracleType.NVarChar).Value = dwData["VKPKPREIS"].ToString();
                    or1.Parameters.Add("VKPHOCHRECH", OracleType.NVarChar).Value = dwData["VKPHOCHRECH"].ToString();
                    or1.Parameters.Add("VKPERFOLG", OracleType.NVarChar).Value = dwData["VKPERFOLG"].ToString();
                    or1.Parameters.Add("VKPANT", OracleType.NVarChar).Value = dwData["VKPANT"].ToString();
                    or1.Parameters.Add("VKPANTSAV", OracleType.NVarChar).Value = dwData["VKPANTSAV"].ToString();
                    or1.Parameters.Add("VKPSIGNED", OracleType.NVarChar).Value = dwData["VKPSIGNED"].ToString();
                    or1.Parameters.Add("VKPABS", OracleType.NVarChar).Value = dwData["VKPABS"].ToString();
                    or1.Parameters.Add("VKPABRKZ", OracleType.NVarChar).Value = dwData["VKPABRKZ"].ToString();
                    or1.Parameters.Add("VKPNOCOUNT", OracleType.NVarChar).Value = dwData["VKPNOCOUNT"].ToString();
                    or1.Parameters.Add("VKPEXAUFKRS", OracleType.NVarChar).Value = dwData["VKPEXAUFKRS"].ToString();
                    or1.Parameters.Add("VKPEXAUFLFD", OracleType.NVarChar).Value = dwData["VKPEXAUFLFD"].ToString();
                    or1.Parameters.Add("VKPEXAUFPOS", OracleType.NVarChar).Value = dwData["VKPEXAUFPOS"].ToString();
                    or1.Parameters.Add("VKPEXART", OracleType.NVarChar).Value = dwData["VKPEXART"].ToString();
                    or1.Parameters.Add("VKPEXVAR", OracleType.NVarChar).Value = dwData["VKPEXVAR"].ToString();
                    or1.Parameters.Add("VKPEXDESS", OracleType.NVarChar).Value = dwData["VKPEXDESS"].ToString();
                    or1.Parameters.Add("VKPEXCOLORIT", OracleType.NVarChar).Value = dwData["VKPEXCOLORIT"].ToString();
                    or1.Parameters.Add("VKPRAPLG", OracleType.NVarChar).Value = dwData["VKPRAPLG"].ToString();
                    or1.Parameters.Add("VKPRAPWDT", OracleType.NVarChar).Value = dwData["VKPRAPWDT"].ToString();
                    or1.Parameters.Add("VKPGESSTA", OracleType.NVarChar).Value = dwData["VKPGESSTA"].ToString();
                    or1.Parameters.Add("VKPARTSTA", OracleType.NVarChar).Value = dwData["VKPARTSTA"].ToString();
                    or1.Parameters.Add("VKPPRSTA", OracleType.NVarChar).Value = dwData["VKPPRSTA"].ToString();
                    or1.Parameters.Add("VKPBSTSTA", OracleType.NVarChar).Value = dwData["VKPBSTSTA"].ToString();
                    or1.Parameters.Add("VKPTERMSTA", OracleType.NVarChar).Value = dwData["VKPTERMSTA"].ToString();
                    or1.Parameters.Add("VKPMGV", OracleType.NVarChar).Value = dwData["VKPMGV"].ToString();
                    or1.Parameters.Add("VKPMGB", OracleType.NVarChar).Value = dwData["VKPMGB"].ToString();
                    or1.Parameters.Add("VKPMGZU", OracleType.NVarChar).Value = dwData["VKPMGZU"].ToString();
                    or1.Parameters.Add("VKPSTV", OracleType.NVarChar).Value = dwData["VKPSTV"].ToString();
                    or1.Parameters.Add("VKPSTB", OracleType.NVarChar).Value = dwData["VKPSTB"].ToString();
                    or1.Parameters.Add("VKPSTZU", OracleType.NVarChar).Value = dwData["VKPSTZU"].ToString();
                    or1.Parameters.Add("VKPSTLGV", OracleType.NVarChar).Value = dwData["VKPSTLGV"].ToString();
                    or1.Parameters.Add("VKPSTLGB", OracleType.NVarChar).Value = dwData["VKPSTLGB"].ToString();
                    or1.Parameters.Add("VKPPAS", OracleType.NVarChar).Value = dwData["VKPPAS"].ToString();
                    or1.Parameters.Add("VKPPAI", OracleType.NVarChar).Value = dwData["VKPPAI"].ToString();
                    or1.Parameters.Add("VKPTSTS", OracleType.NVarChar).Value = dwData["VKPTSTS"].ToString();
                    or1.Parameters.Add("VKPTSTI", OracleType.NVarChar).Value = dwData["VKPTSTI"].ToString();
                    or1.Parameters.Add("VKPTSTLG", OracleType.NVarChar).Value = dwData["VKPTSTLG"].ToString();
                    or1.Parameters.Add("VKPTSTMAX", OracleType.NVarChar).Value = dwData["VKPTSTMAX"].ToString();
                    or1.Parameters.Add("VKPUBLI", OracleType.NVarChar).Value = dwData["VKPUBLI"].ToString();
                    or1.Parameters.Add("VKPAZUTEIL", OracleType.NVarChar).Value = dwData["VKPAZUTEIL"].ToString();
                    or1.Parameters.Add("VKPERSART", OracleType.NVarChar).Value = dwData["VKPERSART"].ToString();
                    or1.Parameters.Add("VKPZUTART", OracleType.NVarChar).Value = dwData["VKPZUTART"].ToString();
                    or1.Parameters.Add("VKPZSBER", OracleType.NVarChar).Value = dwData["VKPZSBER"].ToString();
                    or1.Parameters.Add("VKPFA", OracleType.NVarChar).Value = dwData["VKPFA"].ToString();
                    or1.Parameters.Add("VKPGA", OracleType.NVarChar).Value = dwData["VKPGA"].ToString();
                    or1.Parameters.Add("VKPQA", OracleType.NVarChar).Value = dwData["VKPQA"].ToString();
                    or1.Parameters.Add("VKPMAART", OracleType.NVarChar).Value = dwData["VKPMAART"].ToString();
                    or1.Parameters.Add("VKPMAFZST", OracleType.NVarChar).Value = dwData["VKPMAFZST"].ToString();
                    or1.Parameters.Add("VKPZUSAM", OracleType.NVarChar).Value = dwData["VKPZUSAM"].ToString();
                    or1.Parameters.Add("VKPZUDOPA", OracleType.NVarChar).Value = dwData["VKPZUDOPA"].ToString();
                    or1.Parameters.Add("VKPZUDPA", OracleType.NVarChar).Value = dwData["VKPZUDPA"].ToString();
                    or1.Parameters.Add("VKPGENEHM", OracleType.NVarChar).Value = dwData["VKPGENEHM"].ToString();
                    or1.Parameters.Add("VKPMUVERT", OracleType.NVarChar).Value = dwData["VKPMUVERT"].ToString();
                    or1.Parameters.Add("VKPZRUECK", OracleType.NVarChar).Value = dwData["VKPZRUECK"].ToString();
                    or1.Parameters.Add("VKPZKDAT", OracleType.NVarChar).Value = dwData["VKPZKDAT"].ToString();
                    or1.Parameters.Add("VKPZKBEN", OracleType.NVarChar).Value = dwData["VKPZKBEN"].ToString();
                    or1.Parameters.Add("VKPSTKNEUTR", OracleType.NVarChar).Value = dwData["VKPSTKNEUTR"].ToString();
                    or1.Parameters.Add("VKPPARTGL", OracleType.NVarChar).Value = dwData["VKPPARTGL"].ToString();
                    or1.Parameters.Add("VKPKONFKZ", OracleType.NVarChar).Value = dwData["VKPKONFKZ"].ToString();
                    or1.Parameters.Add("VKPKETTELN", OracleType.NVarChar).Value = dwData["VKPKETTELN"].ToString();
                    or1.Parameters.Add("VKPRESSACHB", OracleType.NVarChar).Value = dwData["VKPRESSACHB"].ToString();
                    or1.Parameters.Add("VKPLAEVON", OracleType.NVarChar).Value = dwData["VKPLAEVON"].ToString();
                    or1.Parameters.Add("VKPLAEBIS", OracleType.NVarChar).Value = dwData["VKPLAEBIS"].ToString();
                    or1.Parameters.Add("VKPSTDLAE", OracleType.NVarChar).Value = dwData["VKPSTDLAE"].ToString();
                    or1.Parameters.Add("VKPSFERTKZ", OracleType.NVarChar).Value = dwData["VKPSFERTKZ"].ToString();
                    or1.Parameters.Add("VKPREGEL", OracleType.NVarChar).Value = dwData["VKPREGEL"].ToString();
                    or1.Parameters.Add("VKPZUTPRIO", OracleType.NVarChar).Value = dwData["VKPZUTPRIO"].ToString();
                    or1.Parameters.Add("VKPSTAFFNR", OracleType.NVarChar).Value = dwData["VKPSTAFFNR"].ToString();
                    or1.Parameters.Add("VKPMAXPKT", OracleType.NVarChar).Value = dwData["VKPMAXPKT"].ToString();
                    or1.Parameters.Add("VKPANZ1", OracleType.NVarChar).Value = dwData["VKPANZ1"].ToString();
                    or1.Parameters.Add("VKPLAENGE1", OracleType.NVarChar).Value = dwData["VKPLAENGE1"].ToString();
                    or1.Parameters.Add("VKPBREITE1", OracleType.NVarChar).Value = dwData["VKPBREITE1"].ToString();
                    or1.Parameters.Add("VKPANZ2", OracleType.NVarChar).Value = dwData["VKPANZ2"].ToString();
                    or1.Parameters.Add("VKPLAENGE2", OracleType.NVarChar).Value = dwData["VKPLAENGE2"].ToString();
                    or1.Parameters.Add("VKPBREITE2", OracleType.NVarChar).Value = dwData["VKPBREITE2"].ToString();
                    or1.Parameters.Add("VKPANZ3", OracleType.NVarChar).Value = dwData["VKPANZ3"].ToString();
                    or1.Parameters.Add("VKPLAENGE3", OracleType.NVarChar).Value = dwData["VKPLAENGE3"].ToString();
                    or1.Parameters.Add("VKPBREITE3", OracleType.NVarChar).Value = dwData["VKPBREITE3"].ToString();
                    or1.Parameters.Add("VKPANZ4", OracleType.NVarChar).Value = dwData["VKPANZ4"].ToString();
                    or1.Parameters.Add("VKPLAENGE4", OracleType.NVarChar).Value = dwData["VKPLAENGE4"].ToString();
                    or1.Parameters.Add("VKPBREITE4", OracleType.NVarChar).Value = dwData["VKPBREITE4"].ToString();
                    or1.Parameters.Add("VKPANZ5", OracleType.NVarChar).Value = dwData["VKPANZ5"].ToString();
                    or1.Parameters.Add("VKPLAENGE5", OracleType.NVarChar).Value = dwData["VKPLAENGE5"].ToString();
                    or1.Parameters.Add("VKPBREITE5", OracleType.NVarChar).Value = dwData["VKPBREITE5"].ToString();
                    or1.Parameters.Add("VKPFIXMASS", OracleType.NVarChar).Value = dwData["VKPFIXMASS"].ToString();
                    or1.Parameters.Add("VKPURLAND", OracleType.NVarChar).Value = dwData["VKPURLAND"].ToString();
                    or1.Parameters.Add("VKPPRFBEG", OracleType.NVarChar).Value = dwData["VKPPRFBEG"].ToString();
                    or1.Parameters.Add("VKPPRFVKD", OracleType.NVarChar).Value = dwData["VKPPRFVKD"].ToString();
                    or1.Parameters.Add("VKPEINWERK", OracleType.NVarChar).Value = dwData["VKPEINWERK"].ToString();
                    or1.Parameters.Add("VKPWERK", OracleType.NVarChar).Value = dwData["VKPWERK"].ToString();
                    or1.Parameters.Add("VKPQPKTH", OracleType.NVarChar).Value = dwData["VKPQPKTH"].ToString();
                    or1.Parameters.Add("VKPQPKTLH", OracleType.NVarChar).Value = dwData["VKPQPKTLH"].ToString();
                    or1.Parameters.Add("VKPRICHGL", OracleType.NVarChar).Value = dwData["VKPRICHGL"].ToString();
                    or1.Parameters.Add("VKPWSCHTXT", OracleType.NVarChar).Value = dwData["VKPWSCHTXT"].ToString();
                    or1.Parameters.Add("VKPFILLER1", OracleType.NVarChar).Value = dwData["VKPFILLER1"].ToString();
                    or1.Parameters.Add("VKPABRUF", OracleType.NVarChar).Value = dwData["VKPABRUF"].ToString();
                    or1.Parameters.Add("VKPLIEFKOMP", OracleType.NVarChar).Value = dwData["VKPLIEFKOMP"].ToString();
                    or1.Parameters.Add("VKPVERSART", OracleType.NVarChar).Value = dwData["VKPVERSART"].ToString();
                    or1.Parameters.Add("VKPZUSATZ", OracleType.NVarChar).Value = dwData["VKPZUSATZ"].ToString();
                    or1.Parameters.Add("VKPKDKOMM", OracleType.NVarChar).Value = dwData["VKPKDKOMM"].ToString();
                    or1.Parameters.Add("VKPLTEILNR", OracleType.NVarChar).Value = dwData["VKPLTEILNR"].ToString();
                    or1.Parameters.Add("VKPVERSLO", OracleType.NVarChar).Value = dwData["VKPVERSLO"].ToString();
                    or1.Parameters.Add("VKPAUTOFREI", OracleType.NVarChar).Value = dwData["VKPAUTOFREI"].ToString();
                    or1.Parameters.Add("VKPSTRECKE", OracleType.NVarChar).Value = dwData["VKPSTRECKE"].ToString();
                    or1.Parameters.Add("VKPANGETEXT", OracleType.NVarChar).Value = dwData["VKPANGETEXT"].ToString();
                    or1.Parameters.Add("VKPANGEWIE", OracleType.NVarChar).Value = dwData["VKPANGEWIE"].ToString();
                    or1.Parameters.Add("VKPBESTTEXT", OracleType.NVarChar).Value = dwData["VKPBESTTEXT"].ToString();
                    or1.Parameters.Add("VKPBESTWIE", OracleType.NVarChar).Value = dwData["VKPBESTWIE"].ToString();
                    or1.Parameters.Add("VKPLIEFTEXT", OracleType.NVarChar).Value = dwData["VKPLIEFTEXT"].ToString();
                    or1.Parameters.Add("VKPLIEFWIE", OracleType.NVarChar).Value = dwData["VKPLIEFWIE"].ToString();
                    or1.Parameters.Add("VKPRECHTEXT", OracleType.NVarChar).Value = dwData["VKPRECHTEXT"].ToString();
                    or1.Parameters.Add("VKPRECHWIE", OracleType.NVarChar).Value = dwData["VKPRECHWIE"].ToString();
                    or1.Parameters.Add("VKPLVORTEXT", OracleType.NVarChar).Value = dwData["VKPLVORTEXT"].ToString();
                    or1.Parameters.Add("VKPLVORWIE", OracleType.NVarChar).Value = dwData["VKPLVORWIE"].ToString();
                    or1.Parameters.Add("VKPIVVTTEXT", OracleType.NVarChar).Value = dwData["VKPIVVTTEXT"].ToString();
                    or1.Parameters.Add("VKPIVVTWIE", OracleType.NVarChar).Value = dwData["VKPIVVTWIE"].ToString();
                    or1.Parameters.Add("VKPIVDITEXT", OracleType.NVarChar).Value = dwData["VKPIVDITEXT"].ToString();
                    or1.Parameters.Add("VKPIVDIWIE", OracleType.NVarChar).Value = dwData["VKPIVDIWIE"].ToString();
                    or1.Parameters.Add("VKPARTTEXT", OracleType.NVarChar).Value = dwData["VKPARTTEXT"].ToString();
                    or1.Parameters.Add("VKPANGEALLG", OracleType.NVarChar).Value = dwData["VKPANGEALLG"].ToString();
                    or1.Parameters.Add("VKPBESTALLG", OracleType.NVarChar).Value = dwData["VKPBESTALLG"].ToString();
                    or1.Parameters.Add("VKPLIEFALLG", OracleType.NVarChar).Value = dwData["VKPLIEFALLG"].ToString();
                    or1.Parameters.Add("VKPRECHALLG", OracleType.NVarChar).Value = dwData["VKPRECHALLG"].ToString();
                    or1.Parameters.Add("VKPLVORALLG", OracleType.NVarChar).Value = dwData["VKPLVORALLG"].ToString();
                    or1.Parameters.Add("VKPIVVTALLG", OracleType.NVarChar).Value = dwData["VKPIVVTALLG"].ToString();
                    or1.Parameters.Add("VKPIVDIALLG", OracleType.NVarChar).Value = dwData["VKPIVDIALLG"].ToString();
                    or1.Parameters.Add("VKPANL1TXT", OracleType.NVarChar).Value = dwData["VKPANL1TXT"].ToString();
                    or1.Parameters.Add("VKPANL2TXT", OracleType.NVarChar).Value = dwData["VKPANL2TXT"].ToString();
                    or1.Parameters.Add("VKPANL3TXT", OracleType.NVarChar).Value = dwData["VKPANL3TXT"].ToString();
                    or1.Parameters.Add("VKPAGT", OracleType.NVarChar).Value = dwData["VKPAGT"].ToString();
                    or1.Parameters.Add("VKPAUF1", OracleType.NVarChar).Value = dwData["VKPAUF1"].ToString();
                    or1.Parameters.Add("VKPAUF2", OracleType.NVarChar).Value = dwData["VKPAUF2"].ToString();
                    or1.Parameters.Add("VKPAUF3", OracleType.NVarChar).Value = dwData["VKPAUF3"].ToString();
                    or1.Parameters.Add("VKPDISPO", OracleType.NVarChar).Value = dwData["VKPDISPO"].ToString();
                    or1.Parameters.Add("VKPDDBENID", OracleType.NVarChar).Value = dwData["VKPDDBENID"].ToString();
                    or1.Parameters.Add("VKPDDAUFTNR", OracleType.NVarChar).Value = dwData["VKPDDAUFTNR"].ToString();
                    or1.Parameters.Add("VKPEKOLL", OracleType.NVarChar).Value = dwData["VKPEKOLL"].ToString();
                    or1.Parameters.Add("VKPEART", OracleType.NVarChar).Value = dwData["VKPEART"].ToString();
                    or1.Parameters.Add("VKPEFARBE", OracleType.NVarChar).Value = dwData["VKPEFARBE"].ToString();
                    or1.Parameters.Add("VKPLVERD", OracleType.NVarChar).Value = dwData["VKPLVERD"].ToString();
                    or1.Parameters.Add("VKPWOBST", OracleType.NVarChar).Value = dwData["VKPWOBST"].ToString();
                    or1.Parameters.Add("VKPEAKZ", OracleType.NVarChar).Value = dwData["VKPEAKZ"].ToString();
                    or1.Parameters.Add("VKPWAEHRSL", OracleType.NVarChar).Value = dwData["VKPWAEHRSL"].ToString();
                    or1.Parameters.Add("VKPKURS", OracleType.NVarChar).Value = dwData["VKPKURS"].ToString();
                    or1.Parameters.Add("VKPBETRAG", OracleType.NVarChar).Value = dwData["VKPBETRAG"].ToString();
                    or1.Parameters.Add("VKPHWAEHRSL", OracleType.NVarChar).Value = dwData["VKPHWAEHRSL"].ToString();
                    or1.Parameters.Add("VKPHEUROKURS", OracleType.NVarChar).Value = dwData["VKPHEUROKURS"].ToString();
                    or1.Parameters.Add("VKPHEUROKURSVK", OracleType.NVarChar).Value = dwData["VKPHEUROKURSVK"].ToString();
                    or1.Parameters.Add("VKPFEUROKURS", OracleType.NVarChar).Value = dwData["VKPFEUROKURS"].ToString();
                    or1.Parameters.Add("VKPFEUROKURSVK", OracleType.NVarChar).Value = dwData["VKPFEUROKURSVK"].ToString();
                    or1.Parameters.Add("VKPTERMNR", OracleType.NVarChar).Value = dwData["VKPTERMNR"].ToString();
                    or1.Parameters.Add("VKPFAELLIG", OracleType.NVarChar).Value = dwData["VKPFAELLIG"].ToString();
                    or1.Parameters.Add("VKPSICHER", OracleType.NVarChar).Value = dwData["VKPSICHER"].ToString();
                    or1.Parameters.Add("VKPSICHP", OracleType.NVarChar).Value = dwData["VKPSICHP"].ToString();
                    or1.Parameters.Add("VKPAKKRED", OracleType.NVarChar).Value = dwData["VKPAKKRED"].ToString();
                    or1.Parameters.Add("VKPBESTPOS", OracleType.NVarChar).Value = dwData["VKPBESTPOS"].ToString();
                    or1.Parameters.Add("VKPDBLATT", OracleType.NVarChar).Value = dwData["VKPDBLATT"].ToString();
                    or1.Parameters.Add("VKPTBRIEF", OracleType.NVarChar).Value = dwData["VKPTBRIEF"].ToString();
                    or1.Parameters.Add("VKPARTBILD", OracleType.NVarChar).Value = dwData["VKPARTBILD"].ToString();
                    or1.Parameters.Add("VKPFORMAT", OracleType.NVarChar).Value = dwData["VKPFORMAT"].ToString();
                    or1.Parameters.Add("VKPZEUGNIS", OracleType.NVarChar).Value = dwData["VKPZEUGNIS"].ToString();
                    or1.Parameters.Add("VKPPLANKRS", OracleType.NVarChar).Value = dwData["VKPPLANKRS"].ToString();
                    or1.Parameters.Add("VKPPLANLFD", OracleType.NVarChar).Value = dwData["VKPPLANLFD"].ToString();
                    or1.Parameters.Add("VKPRES1", OracleType.NVarChar).Value = dwData["VKPRES1"].ToString();
                    or1.Parameters.Add("VKPRES2", OracleType.NVarChar).Value = dwData["VKPRES2"].ToString();
                    or1.Parameters.Add("VKPVKZUABVH", OracleType.NVarChar).Value = dwData["VKPVKZUABVH"].ToString();
                    or1.Parameters.Add("VKPVKZUSAMP", OracleType.NVarChar).Value = dwData["VKPVKZUSAMP"].ToString();
                    or1.Parameters.Add("VKPVKZUADR", OracleType.NVarChar).Value = dwData["VKPVKZUADR"].ToString();
                    or1.Parameters.Add("VKPFKSPKZ", OracleType.NVarChar).Value = dwData["VKPFKSPKZ"].ToString();
                    or1.Parameters.Add("VKPFKSPRD", OracleType.NVarChar).Value = dwData["VKPFKSPRD"].ToString();
                    or1.Parameters.Add("VKPFKSPTD", OracleType.NVarChar).Value = dwData["VKPFKSPTD"].ToString();
                    or1.Parameters.Add("VKPKREDLIM", OracleType.NVarChar).Value = dwData["VKPKREDLIM"].ToString();
                    or1.Parameters.Add("VKPSWING", OracleType.NVarChar).Value = dwData["VKPSWING"].ToString();
                    or1.Parameters.Add("VKPRAITING", OracleType.NVarChar).Value = dwData["VKPRAITING"].ToString();
                    or1.Parameters.Add("VKPVERSCHL", OracleType.NVarChar).Value = dwData["VKPVERSCHL"].ToString();
                    or1.Parameters.Add("VKPKREDBIS", OracleType.NVarChar).Value = dwData["VKPKREDBIS"].ToString();
                    or1.Parameters.Add("VKPKREDVON", OracleType.NVarChar).Value = dwData["VKPKREDVON"].ToString();
                    or1.Parameters.Add("VKPLUEBKZ", OracleType.NVarChar).Value = dwData["VKPLUEBKZ"].ToString();
                    or1.Parameters.Add("VKPFRDAT", OracleType.NVarChar).Value = dwData["VKPFRDAT"].ToString();
                    or1.Parameters.Add("VKPFRZEIT", OracleType.NVarChar).Value = dwData["VKPFRZEIT"].ToString();
                    or1.Parameters.Add("VKPFRBENID", OracleType.NVarChar).Value = dwData["VKPFRBENID"].ToString();
                    or1.Parameters.Add("VKPFRKZ", OracleType.NVarChar).Value = dwData["VKPFRKZ"].ToString();
                    or1.Parameters.Add("VKPCUSIGNED", OracleType.NVarChar).Value = dwData["VKPCUSIGNED"].ToString();
                    or1.Parameters.Add("VKPSTPROV", OracleType.NVarChar).Value = dwData["VKPSTPROV"].ToString();
                    or1.Parameters.Add("VKPSTFRACHT", OracleType.NVarChar).Value = dwData["VKPSTFRACHT"].ToString();
                    or1.Parameters.Add("VKPSTFRME", OracleType.NVarChar).Value = dwData["VKPSTFRME"].ToString();
                    or1.Parameters.Add("VKPSTIMP", OracleType.NVarChar).Value = dwData["VKPSTIMP"].ToString();
                    or1.Parameters.Add("VKPSTVERS", OracleType.NVarChar).Value = dwData["VKPSTVERS"].ToString();
                    or1.Parameters.Add("VKPSTZOLL", OracleType.NVarChar).Value = dwData["VKPSTZOLL"].ToString();
                    or1.Parameters.Add("VKPFRGRENZ", OracleType.NVarChar).Value = dwData["VKPFRGRENZ"].ToString();
                    or1.Parameters.Add("VKPFRGRME", OracleType.NVarChar).Value = dwData["VKPFRGRME"].ToString();
                    or1.Parameters.Add("VKPVERSGRENZ", OracleType.NVarChar).Value = dwData["VKPVERSGRENZ"].ToString();
                    or1.Parameters.Add("VKPZTARIF", OracleType.NVarChar).Value = dwData["VKPZTARIF"].ToString();
                    or1.Parameters.Add("VKPEDIKZ", OracleType.NVarChar).Value = dwData["VKPEDIKZ"].ToString();
                    or1.Parameters.Add("VKPKOMMNR", OracleType.NVarChar).Value = dwData["VKPKOMMNR"].ToString();
                    or1.Parameters.Add("VKPKOMMPOS", OracleType.NVarChar).Value = dwData["VKPKOMMPOS"].ToString();
                    or1.Parameters.Add("VKPEDIDAT", OracleType.NVarChar).Value = dwData["VKPEDIDAT"].ToString();
                    or1.Parameters.Add("VKPEDIZEIT", OracleType.NVarChar).Value = dwData["VKPEDIZEIT"].ToString();
                    or1.Parameters.Add("VKPURBESTPOS", OracleType.NVarChar).Value = dwData["VKPURBESTPOS"].ToString();
                    or1.Parameters.Add("VKPVERTRNRK", OracleType.NVarChar).Value = dwData["VKPVERTRNRK"].ToString();
                    or1.Parameters.Add("VKPVERTRPOSK", OracleType.NVarChar).Value = dwData["VKPVERTRPOSK"].ToString();
                    or1.Parameters.Add("VKPOPREIS", OracleType.NVarChar).Value = dwData["VKPOPREIS"].ToString();
                    or1.Parameters.Add("VKPOMENGE", OracleType.NVarChar).Value = dwData["VKPOMENGE"].ToString();
                    or1.Parameters.Add("VKPWUTERMKO", OracleType.NVarChar).Value = dwData["VKPWUTERMKO"].ToString();
                    or1.Parameters.Add("VKPKZERSATZ", OracleType.NVarChar).Value = dwData["VKPKZERSATZ"].ToString();
                    or1.Parameters.Add("VKPBUSIMODE", OracleType.NVarChar).Value = dwData["VKPBUSIMODE"].ToString();
                    or1.Parameters.Add("VKPEXMANDANT", OracleType.NVarChar).Value = dwData["VKPEXMANDANT"].ToString();
                    or1.Parameters.Add("VKPRUECKTG", OracleType.NVarChar).Value = dwData["VKPRUECKTG"].ToString();
                    or1.Parameters.Add("VKPLIEFTERMN", OracleType.NVarChar).Value = dwData["VKPLIEFTERMN"].ToString();
                    or1.Parameters.Add("VKPVERARBSTA", OracleType.NVarChar).Value = dwData["VKPVERARBSTA"].ToString();
                    or1.Parameters.Add("VKPCTO", OracleType.NVarChar).Value = dwData["VKPCTO"].ToString();
                    or1.Parameters.Add("VKPVTRNRK2", OracleType.NVarChar).Value = dwData["VKPVTRNRK2"].ToString();
                    or1.Parameters.Add("VKPVTRPOSK2", OracleType.NVarChar).Value = dwData["VKPVTRPOSK2"].ToString();
                    or1.Parameters.Add("VKPAENTIME", OracleType.NVarChar).Value = dwData["VKPAENTIME"].ToString();
                    or1.Parameters.Add("VKPMAINPROG", OracleType.NVarChar).Value = dwData["VKPMAINPROG"].ToString();
                    or1.Parameters.Add("VKPSAMPTYP", OracleType.NVarChar).Value = dwData["VKPSAMPTYP"].ToString();
                    or1.Parameters.Add("VKPUSRSTA", OracleType.NVarChar).Value = dwData["VKPUSRSTA"].ToString();
                    or1.Parameters.Add("VKPACCVERS", OracleType.NVarChar).Value = dwData["VKPACCVERS"].ToString();
                    or1.Parameters.Add("VKPLIART", OracleType.NVarChar).Value = dwData["VKPLIART"].ToString();
                    or1.Parameters.Add("VKPDELTAE", OracleType.NVarChar).Value = dwData["VKPDELTAE"].ToString();
                    or1.Parameters.Add("VKPLIART2", OracleType.NVarChar).Value = dwData["VKPLIART2"].ToString();
                    or1.Parameters.Add("VKPDELTAE2", OracleType.NVarChar).Value = dwData["VKPDELTAE2"].ToString();
                    or1.Parameters.Add("VKPLIART3", OracleType.NVarChar).Value = dwData["VKPLIART3"].ToString();
                    or1.Parameters.Add("VKPDELTAE3", OracleType.NVarChar).Value = dwData["VKPDELTAE3"].ToString();
                    or1.Parameters.Add("VKPLINKMARK", OracleType.NVarChar).Value = dwData["VKPLINKMARK"].ToString();
                    or1.Parameters.Add("VKPFILLER2", OracleType.NVarChar).Value = dwData["VKPFILLER2"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    break;
                case 2://VKPPRODST
                    #region====Command====

                    or1.CommandText = "UPDATE VKPOS SET "
                        + "VKPPRODST=:VKPPRODST"
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT  AND VKPSA=:VKPSA  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPSA", OracleType.NVarChar).Value = dwData["VKPSA"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPPRODST", OracleType.NVarChar).Value = dwData["VKPPRODST"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    break;
                case 3:
                    #region====Command====
                    //VKPVERZEING5对应的格式为DD.MM.YY
                    or1.CommandText = "UPDATE VKPOS SET "
                        + "VKPFREITERM=:VKPLIEFTERM,"
                        + "VKPVERSTERM=:VKPLIEFTERM,"
                        + "VKPLIEFEING=:VKPLIEFEING,"
                        + "VKPLIEFTERM=:VKPLIEFTERM,"
                            + "VKPGESSTA=:VKPGESSTA,"
                        + "VKPTERMSTA=:VKPTERMSTA,"
                        + "VKPVERZEING1=:VKPVERZEING1,"
                        + "VKPVERZTERM1=:VKPVERZTERM1,"
                        + "VKPVERZEING2=:VKPVERZEING2,"
                        + "VKPVERZTERM2=:VKPVERZTERM2,"
                        + "VKPVERZEING3=:VKPVERZEING3,"
                        + "VKPVERZTERM3=:VKPVERZTERM3,"
                        + "VKPVERZEING4=:VKPVERZEING4,"
                        + "VKPVERZTERM4=:VKPVERZTERM4,"
                        + "VKPVERZEING5=:VKPVERZEING5,"
                        + "VKPVERZTERM5=:VKPVERZTERM5, "
                        + "VKPKKOLL=:VKPKKOLL "
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT  AND VKPSA=:VKPSA  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPSA", OracleType.NVarChar).Value = dwData["VKPSA"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPLIEFEING", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPLIEFTERM"].ToString());
                    or1.Parameters.Add("VKPLIEFTERM", OracleType.NVarChar).Value = dwData["VKPLIEFTERM"].ToString();
                    or1.Parameters.Add("VKPTERMSTA", OracleType.NVarChar).Value = "80";
                    or1.Parameters.Add("VKPGESSTA", OracleType.NVarChar).Value = " ";

                    or1.Parameters.Add("VKPVERZEING1", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM1"].ToString());
                    or1.Parameters.Add("VKPVERZTERM1", OracleType.NVarChar).Value = dwData["VKPVERZTERM1"].ToString();
                    or1.Parameters.Add("VKPVERZEING2", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM2"].ToString());
                    or1.Parameters.Add("VKPVERZTERM2", OracleType.NVarChar).Value = dwData["VKPVERZTERM2"].ToString();
                    or1.Parameters.Add("VKPVERZEING3", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM3"].ToString());
                    or1.Parameters.Add("VKPVERZTERM3", OracleType.NVarChar).Value = dwData["VKPVERZTERM3"].ToString();
                    or1.Parameters.Add("VKPVERZEING4", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM4"].ToString());
                    or1.Parameters.Add("VKPVERZTERM4", OracleType.NVarChar).Value = dwData["VKPVERZTERM4"].ToString();
                    or1.Parameters.Add("VKPVERZEING5", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM5"].ToString());
                    or1.Parameters.Add("VKPVERZTERM5", OracleType.NVarChar).Value = dwData["VKPVERZTERM5"].ToString();
                    or1.Parameters.Add("VKPKKOLL", OracleType.NVarChar).Value = dwData["VKPKKOLL"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    break;
                case 4:
                    #region====Command====
                    or1.CommandText = "UPDATE VKPOS SET "
                                + "VKPFREITERM=:VKPLIEFTERM,"
                                + "VKPVERSTERM=:VKPLIEFTERM,"
                                + "VKPLIEFEING=:VKPLIEFEING,"
                                + "VKPLIEFTERM=:VKPLIEFTERM,"
                                    + "VKPGESSTA=:VKPGESSTA,"
                                + "VKPTERMSTA=:VKPTERMSTA "
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT  AND VKPSA=:VKPSA  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPSA", OracleType.NVarChar).Value = dwData["VKPSA"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPLIEFEING", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPLIEFTERM"].ToString());
                    or1.Parameters.Add("VKPLIEFTERM", OracleType.NVarChar).Value = dwData["VKPLIEFTERM"].ToString();
                    or1.Parameters.Add("VKPTERMSTA", OracleType.NVarChar).Value = "80";
                    or1.Parameters.Add("VKPGESSTA", OracleType.NVarChar).Value = " ";


                    #endregion
                    Connect2Proxy(or1);
                    break;
                case 5:
                    #region====Command====
                    or1.CommandText = "UPDATE VKPOS SET "
                                + "VKPPRODST=:VKPPRODST,"
                                + "VKPRESERV=:VKPRESERV,"
                                + "VKPRESERVT1=:VKPRESERVT1,"
                                + "VKPRESERVT2=:VKPRESERVT2,"
                                    + "VKPRESERVT3=:VKPRESERVT3,"
                                + "VKPRESERVT4=:VKPRESERVT4 "
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT  AND VKPSA=:VKPSA  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPSA", OracleType.NVarChar).Value = dwData["VKPSA"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPPRODST", OracleType.NVarChar).Value = dwData["VKPPRODST"].ToString();
                    or1.Parameters.Add("VKPRESERV", OracleType.NVarChar).Value = dwData["VKPRESERV"].ToString();
                    or1.Parameters.Add("VKPRESERVT1", OracleType.NVarChar).Value = dwData["VKPRESERVT1"].ToString();
                    or1.Parameters.Add("VKPRESERVT2", OracleType.NVarChar).Value = dwData["VKPRESERVT2"].ToString();
                    or1.Parameters.Add("VKPRESERVT3", OracleType.NVarChar).Value = dwData["VKPRESERVT3"].ToString();
                    or1.Parameters.Add("VKPRESERVT4", OracleType.NVarChar).Value = dwData["VKPRESERVT4"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    break;
                case 6:
                    #region====Command====
                    or1.CommandText = "UPDATE VKPOS SET "
                                + "VKPRESERV=:VKPRESERV," 
                                + "VKPRESERVT4=:VKPRESERVT4 "
                       + " WHERE  VKPMANDANT=:VKPMANDANT  AND VKPSA='  '  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion 

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString(); 
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPRESERV", OracleType.NVarChar).Value = dwData["C20"].ToString();
                    or1.Parameters.Add("VKPRESERVT4", OracleType.NVarChar).Value = dwData["C20"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    break;

                     case 7:
                    #region====Command====
                    or1.CommandText = "UPDATE VKPOS SET (VKPZUGET,VKPZUGETT4)=(SELECT SUM(GAKG5),SUM(GAKG5) FROM GAAUF WHERE GAMANDANT=VKPMANDANT AND GAAUFKRS=VKPAUFKRS AND GAAUFLFD=VKPAUFLFD AND GAAUFPOS=VKPAUFPOS AND GASA=610 AND VKPSA='  ')"
                        + " WHERE VKPMANDANT=:VKPMANDANT AND  VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS AND VKPSA='  '"
                        +" AND EXISTS (SELECT 1 FROM GAAUF WHERE GAMANDANT=VKPMANDANT AND GAAUFKRS=VKPAUFKRS AND GAAUFLFD=VKPAUFLFD AND GAAUFPOS=VKPAUFPOS AND GASA=610 AND VKPSA='  ')";
                    #endregion 
                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString(); 
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString(); 
                    #endregion
                    Connect2Proxy(or1);
                    break;

                     case 8:
                    #region====Command====
                    or1.CommandText = "UPDATE VKPOS SET "
                                + "VKPRESERV=:VKPRESERV, VKPEXAUFKRS='  ',VKPEXAUFLFD='000000',VKPEXAUFPOS='000',"
                                + "VKPRESERVT4=:VKPRESERVT4 "
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT  AND VKPSA='  '  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPRESERV", OracleType.NVarChar).Value = dwData["C20"].ToString();
                    or1.Parameters.Add("VKPRESERVT4", OracleType.NVarChar).Value = dwData["C20"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    break;
                     case 9:
                    #region====Command====
                    //VKPVERZEING5对应的格式为DD.MM.YY
                    or1.CommandText = "UPDATE VKPOS SET "
                        + "VKPFREITERM=:VKPLIEFTERM,"
                        + "VKPVERSTERM=:VKPLIEFTERM,"
                        + "VKPLIEFEING=:VKPLIEFEING,"
                        + "VKPLIEFTERM=:VKPLIEFTERM,"
                            + "VKPGESSTA=:VKPGESSTA,"
                        + "VKPTERMSTA=:VKPTERMSTA,"
                        + "VKPVERZEING1=:VKPVERZEING1,"
                        + "VKPVERZTERM1=:VKPVERZTERM1,"
                        + "VKPVERZEING2=:VKPVERZEING2,"
                        + "VKPVERZTERM2=:VKPVERZTERM2,"
                        + "VKPVERZEING3=:VKPVERZEING3,"
                        + "VKPBESTTERM3=:VKPBESTTERM3,"
                        + "VKPVERZTERM3=:VKPVERZTERM3,"
                        + "VKPVERZEING4=:VKPVERZEING4,"
                        + "VKPVERZTERM4=:VKPVERZTERM4,"
                        + "VKPVERZEING5=:VKPVERZEING5,"
                        + "VKPVERZTERM5=:VKPVERZTERM5, "
                         + "VKPBESTTERM5=:VKPBESTTERM5,"
                        + "VKPKKOLL=:VKPKKOLL "
                       + " WHERE  "
                       + "  VKPMANDANT=:VKPMANDANT  AND VKPSA=:VKPSA  AND VKPAUFKRS=:VKPAUFKRS AND VKPAUFLFD=:VKPAUFLFD AND VKPAUFPOS=:VKPAUFPOS";
                    #endregion

                    #region====Parameters====
                    or1.Parameters.Add("VKPMANDANT", OracleType.NVarChar).Value = dwData["VKPMANDANT"].ToString();
                    or1.Parameters.Add("VKPSA", OracleType.NVarChar).Value = dwData["VKPSA"].ToString();
                    or1.Parameters.Add("VKPAUFKRS", OracleType.NVarChar).Value = dwData["VKPAUFKRS"].ToString();
                    or1.Parameters.Add("VKPAUFLFD", OracleType.NVarChar).Value = dwData["VKPAUFLFD"].ToString();
                    or1.Parameters.Add("VKPAUFPOS", OracleType.NVarChar).Value = dwData["VKPAUFPOS"].ToString();
                    or1.Parameters.Add("VKPLIEFEING", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPLIEFTERM"].ToString());
                    or1.Parameters.Add("VKPLIEFTERM", OracleType.NVarChar).Value = dwData["VKPLIEFTERM"].ToString();
                    or1.Parameters.Add("VKPTERMSTA", OracleType.NVarChar).Value = "80";
                    or1.Parameters.Add("VKPGESSTA", OracleType.NVarChar).Value = " ";

                    or1.Parameters.Add("VKPVERZEING1", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM1"].ToString());
                    or1.Parameters.Add("VKPVERZTERM1", OracleType.NVarChar).Value = dwData["VKPVERZTERM1"].ToString();
                    or1.Parameters.Add("VKPVERZEING2", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM2"].ToString());
                    or1.Parameters.Add("VKPVERZTERM2", OracleType.NVarChar).Value = dwData["VKPVERZTERM2"].ToString();
                    or1.Parameters.Add("VKPVERZEING3", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM3"].ToString());
                    or1.Parameters.Add("VKPVERZTERM3", OracleType.NVarChar).Value = dwData["VKPVERZTERM3"].ToString();
                    or1.Parameters.Add("VKPBESTTERM3", OracleType.NVarChar).Value = dwData["VKPBESTTERM3"].ToString();
                    or1.Parameters.Add("VKPVERZEING4", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM4"].ToString());
                    or1.Parameters.Add("VKPVERZTERM4", OracleType.NVarChar).Value = dwData["VKPVERZTERM4"].ToString();
                    or1.Parameters.Add("VKPVERZEING5", OracleType.NVarChar).Value = GetDDMMYY(dwData["VKPVERZTERM5"].ToString());
                    or1.Parameters.Add("VKPVERZTERM5", OracleType.NVarChar).Value = dwData["VKPVERZTERM5"].ToString();
                    or1.Parameters.Add("VKPBESTTERM5", OracleType.NVarChar).Value = dwData["VKPBESTTERM5"].ToString();
                    or1.Parameters.Add("VKPKKOLL", OracleType.NVarChar).Value = dwData["VKPKKOLL"].ToString();
                    #endregion
                    Connect2Proxy(or1);
                    break;
                      
                default:
                    break;
            }

        }
    }
}
